/* Centralized Web Design Tokens mirroring DesignTokens.xaml & DarkStageTheme.xaml (ADR-008, ADR-015, rules.md §5.4)
   Tune colors, typography, radii, and spacing in this single file to restyle the entire Blazor companion site. */
:root {
    /* Semantic Stage & Surface Palette */
    --stage-bg-canvas: #090D16;
    --stage-bg-card: #111827;
    --stage-bg-toolbar: #1E293B;
    --stage-bg-elevated: #0F172A;
    --stage-bg-subtle: rgba(15, 23, 42, 0.68);
    --stage-surface-hover: rgba(30, 41, 59, 0.72);
    --stage-surface-card-top: rgba(255, 255, 255, 0.055);
    --stage-backdrop-scrim: rgba(5, 8, 15, 0.78);
    --stage-header-glass: rgba(9, 13, 22, 0.82);
    --stage-card-glass: rgba(17, 24, 39, 0.76);

    /* Semantic Text Palette (>= 7:1 WCAG AAA contrast on canvas/card) */
    --stage-text-primary: #F8FAFC;
    --stage-text-secondary: #CBD5E1;
    --stage-text-muted: #94A3B8;
    --stage-paper-white: #FFFFFF;

    /* Musical & Status Accents */
    --stage-accent-chord: #38BDF8;
    --stage-accent-cue: #FBBF24;
    --stage-border-subtle: #334155;
    --stage-border-hairline: rgba(148, 163, 184, 0.14);
    --stage-border-strong: rgba(148, 163, 184, 0.26);
    --stage-border-glow-sky: rgba(56, 189, 248, 0.36);
    --stage-border-glow-cue: rgba(251, 191, 36, 0.36);
    --stage-sync-green: #22C55E;
    --stage-sync-amber: #F59E0B;
    --stage-sync-red: #EF4444;
    --stage-danger: #EF4444;

    /* 2026 Elevated CTA & Tinted Surfaces */
    --stage-cta-primary-bg: #38BDF8;
    --stage-cta-primary-hover: #7DD3FC;
    --stage-cta-primary-fg: #06101F;
    --stage-tint-sky: rgba(56, 189, 248, 0.11);
    --stage-tint-cue: rgba(251, 191, 36, 0.11);
    --stage-tint-green: rgba(34, 197, 94, 0.11);
    --stage-tint-red: rgba(239, 68, 68, 0.11);
    --stage-glow-sky: rgba(56, 189, 248, 0.15);
    --stage-glow-cue: rgba(251, 191, 36, 0.08);
    --stage-grid-dot: rgba(148, 163, 184, 0.09);
    --stage-shadow-card: 0 12px 32px rgba(2, 6, 23, 0.42);
    --stage-shadow-hero: 0 28px 72px rgba(2, 6, 23, 0.65);

    /* Theme-Adaptive Song Drawing & Marker Tusch Tokens */
    --stage-ink-pen-adaptive: var(--stage-text-primary);
    --stage-ink-pen-red: #FB7185;
    --stage-ink-pen-green: #34D399;
    --stage-ink-pen-blue: #38BDF8;
    --stage-ink-marker-adaptive: rgba(148, 163, 184, 0.28);
    --stage-ink-marker-red: rgba(244, 63, 94, 0.34);
    --stage-ink-marker-green: rgba(16, 185, 129, 0.32);
    --stage-ink-marker-blue: rgba(56, 189, 248, 0.34);

    /* Editor Quick-Insert Color Swatch Palette (matches ChordProEditorPresets.TextColorSwatches / BgColorSwatches) */
    --editor-fg-amber: #FBBF24;
    --editor-fg-sky: #38BDF8;
    --editor-fg-emerald: #34D399;
    --editor-fg-coral: #FB7185;
    --editor-fg-violet: #C084FC;
    --editor-fg-gold: #FDE047;
    --editor-fg-slate: #94A3B8;

    --editor-bg-amber: #78350F;
    --editor-bg-ocean: #1E3A8A;
    --editor-bg-forest: #064E3B;
    --editor-bg-crimson: #7F1D1D;
    --editor-bg-plum: #4C1D95;
    --editor-bg-gold: #854D0E;
    --editor-bg-slate: #334155;

    --editor-font-scale: 15px;

    /* Structural Metrics & Containers */
    --token-touch-min: 42px;
    --token-radius-card: 16px;
    --token-radius-pill: 10px;
    --token-radius-round: 999px;
    --token-space-xs: 0.35rem;
    --token-space-sm: 0.65rem;
    --token-space-md: 1rem;
    --token-space-lg: 1.5rem;
    --token-space-xl: 2.5rem;
    --token-marketing-max-width: 100%;
    --token-max-width: 100%;
    --token-studio-max-width: 100%;

    /* Typography */
    --token-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --token-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (min-width: 740px) {
    :root {
        --token-marketing-max-width: min(92vw, 1240px);
        --token-max-width: min(94vw, 1400px);
        --token-studio-max-width: min(96vw, 1920px);
    }
}
