/* ============================================
   WARM EDITORIAL — Parchment / Newspaper Style
   Copper Accent · Source Serif 4 · Ink Navy
   ============================================ */

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

    /* --- Surfaces (warm parchment) --- */
    --bg: #f5f4ed;
    --surface: #fffef9;
    --surface-hero: #f0efe5;
    --surface-elevated: #eae9e0;
    --surface-recessed: #ecebe2;

    /* --- Borders --- */
    --border: rgba(27, 54, 93, 0.10);
    --border-bright: rgba(27, 54, 93, 0.18);
    --border-accent: rgba(181, 101, 42, 0.25);
    --border-accent-soft: rgba(181, 101, 42, 0.35);
    --border-danger: rgba(180, 60, 40, 0.2);
    --border-p0: rgba(176, 58, 46, 0.25);
    --border-p1: rgba(181, 101, 42, 0.25);
    --border-p2: rgba(27, 54, 93, 0.2);
    --border-muted: rgba(138, 138, 122, 0.15);

    /* --- Text --- */
    --text: #1B365D;
    --text-dim: #4a5568;
    --text-muted: #8a8a7a;

    /* --- Accent: Copper --- */
    --gold: #B5652A;
    --gold-bright: #D4843A;
    --gold-dim: rgba(181, 101, 42, 0.06);

    /* --- Semantic --- */
    --green: #2d6a4f;
    --green-bg: rgba(45, 106, 79, 0.08);
    --red: #b03a2e;
    --red-bg: rgba(176, 58, 46, 0.06);
    --blue: #1B365D;
    --blue-bg: rgba(27, 54, 93, 0.06);
    --orange: #B5652A;

    /* --- Sentiment --- */
    --sentiment-strong-positive: #2d6a4f;
    --sentiment-positive: #40916c;
    --sentiment-neutral: #8a8a7a;
    --sentiment-negative: #b03a2e;
    --sentiment-strong-negative: #8b1a1a;

    /* --- Priority --- */
    --priority-p0: #b03a2e;
    --priority-p1: #B5652A;
    --priority-p2: #1B365D;

    /* --- 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(27, 54, 93, 0.02);
    --surface-inset: rgba(27, 54, 93, 0.03);
    --surface-hover-subtle: rgba(27, 54, 93, 0.02);
    --surface-hover: rgba(27, 54, 93, 0.04);
    --surface-badge-muted: rgba(138, 138, 122, 0.10);
}

/* ============================================
   4-LAYER DEPTH SYSTEM (warm glass)
   ============================================ */
.depth-hero {
    background: linear-gradient(145deg, rgba(255, 254, 249, 0.85) 0%, rgba(255, 254, 249, 0.6) 55%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(181, 101, 42, 0.12);
    box-shadow:
        0 8px 32px rgba(181, 101, 42, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.depth-elevated {
    background: rgba(255, 254, 249, 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.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.depth-default {
    background: rgba(255, 254, 249, 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 parchment tint
   ============================================ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(181, 101, 42, 0.015) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(181, 101, 42, 0.01) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   HEADER — Copper accent line
   ============================================ */
.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--gold);
}

/* ============================================
   KPI STRIP — First card copper highlight
   ============================================ */
.kpi-card:first-child {
    background: var(--surface-hero);
}

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

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

/* ============================================
   PERSONA CARD — Copper 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;
}
