/* ============================================
   POSTHOG ANALYTICS — Warm Off-White Theme
   Orange Accent · PostHog Style · Inter
   ============================================ */

:root {
    /* --- Typography --- */
    --font-display: 'Inter', 'Segoe UI', 'Noto Sans SC', sans-serif;
    --font-body: 'Inter', 'Segoe UI', 'Noto Sans SC', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

    /* --- Surfaces (warm light — 明显暖色调) --- */
    --bg: #F8F5F0;
    --surface: #FFFDF8;
    --surface-hero: #FFF3E6;
    --surface-elevated: #F5EFE5;
    --surface-recessed: #F0EBE0;

    /* --- Borders --- */
    --border: rgba(0, 0, 0, 0.08);
    --border-bright: rgba(0, 0, 0, 0.14);
    --border-accent: rgba(245, 78, 0, 0.3);
    --border-accent-soft: rgba(245, 78, 0, 0.5);
    --border-danger: rgba(220, 50, 50, 0.2);
    --border-p0: rgba(220, 50, 50, 0.25);
    --border-p1: rgba(245, 78, 0, 0.25);
    --border-p2: rgba(91, 141, 239, 0.2);
    --border-muted: rgba(138, 140, 132, 0.15);

    /* --- Text --- */
    --text: #1a1a2e;
    --text-dim: #4d4f46;
    --text-muted: #8a8c84;

    /* --- Accent: Orange --- */
    --gold: #F54E00;
    --gold-bright: #FF6B2B;
    --gold-dim: rgba(245, 78, 0, 0.10);

    /* --- Semantic --- */
    --green: #4CAF50;
    --green-bg: rgba(76, 175, 80, 0.08);
    --red: #dc3232;
    --red-bg: rgba(220, 50, 50, 0.06);
    --blue: #5B8DEF;
    --blue-bg: rgba(91, 141, 239, 0.06);
    --orange: #F54E00;

    /* --- Sentiment --- */
    --sentiment-strong-positive: #4CAF50;
    --sentiment-positive: #66BB6A;
    --sentiment-neutral: #8a8c84;
    --sentiment-negative: #dc3232;
    --sentiment-strong-negative: #b71c1c;

    /* --- Priority --- */
    --priority-p0: #dc3232;
    --priority-p1: #F54E00;
    --priority-p2: #5B8DEF;

    /* --- Spacing --- */
    --sp-xs: 0.25rem;
    --sp-sm: 0.5rem;
    --sp-md: 1rem;
    --sp-lg: 1.5rem;
    --sp-xl: 2rem;
    --sp-2xl: 3rem;
    --sp-3xl: 4rem;

    /* --- Theme-specific helpers (warm light) --- */
    --surface-alt: rgba(0, 0, 0, 0.02);
    --surface-inset: rgba(0, 0, 0, 0.03);
    --surface-hover-subtle: rgba(0, 0, 0, 0.02);
    --surface-hover: rgba(0, 0, 0, 0.04);
    --surface-badge-muted: rgba(138, 140, 132, 0.10);
}

/* ============================================
   4-LAYER DEPTH SYSTEM (warm light + glass)
   ============================================ */
.depth-hero {
    background: linear-gradient(145deg, rgba(255, 253, 248, 0.85) 0%, rgba(255, 253, 248, 0.65) 60%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 8px 32px rgba(245, 78, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.depth-elevated {
    background: rgba(255, 253, 248, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.depth-default {
    background: rgba(255, 253, 248, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.depth-recessed {
    background: var(--surface-recessed);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ============================================
   AMBIENT — Warm orange tint
   ============================================ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(245, 78, 0, 0.015) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(245, 78, 0, 0.01) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   HEADER — Transparent, blends into page
   ============================================ */
.header {
    background: transparent;
    border-bottom-color: rgba(245, 78, 0, 0.12);
}

.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--gold);
}

/* ============================================
   KPI STRIP — Orange tinted gap borders + first card highlight
   ============================================ */
.kpi-strip {
    background: rgba(245, 78, 0, 0.15);
}

.kpi-card:first-child {
    background: var(--surface-hero);
}

.kpi-card:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
}

/* ============================================
   JUDGEMENT PANEL — Circular orange decoration
   ============================================ */
.judgement-panel::after {
    content: '';
    position: absolute;
    right: -100px;
    top: -100px;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(245, 78, 0, 0.08);
    border-radius: 50%;
    transform: rotate(15deg);
    pointer-events: none;
}

/* ============================================
   PERSONA CARD — Orange radial decoration
   ============================================ */
.persona-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle at corner, var(--gold) 0%, transparent 70%);
    opacity: 0.04;
}
