/* ============================================
   SHARED STYLES - UNIFIED DESIGN SYSTEM
   ============================================

   ⚠️  IMPORT ORDER REQUIREMENT:
   This file MUST be imported FIRST in all templates.

   Standard import order:
   1. shared.css   (this file - foundational styles + design tokens)
   2. navbar.css   (component-specific styles)

   ⚠️  CRITICAL DEPENDENCIES:
   This file contains CSS variables that define the site's unified 
   color palette. All pages MUST import this file.

   Key features:
   - Unified color system with dark mode first
   - Prismatic text gradient (.prismatic-text class)
   - Badge system (.source-badge, .role-badge, .recommendation-badge)
   - Typography scale
   - Spacing system
   ============================================ */

/* ============================================
   UNIFIED DESIGN TOKENS
   ============================================
   Modern dark mode palette with cyan accent.
   All colors use CSS custom properties for easy theming.
   ============================================ */

:root {
    /* === PRIMARY BACKGROUNDS === */
    --bg-base: #050608;
    --bg-surface: #111318;
    --bg-elevated: #171923;
    --bg-subtle: #1a1a1a;
    --bg-hover: #1e2230;
    
    /* Legacy aliases (for backward compatibility) */
    --color-background: var(--bg-base);
    --color-surface: var(--bg-surface);
    --color-surface-elevated: var(--bg-elevated);
    --color-surface-hover: var(--bg-hover);
    
    /* === TEXT COLORS === */
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --text-tertiary: #6B7280;
    --text-muted: #4B5563;
    
    /* Legacy aliases */
    --color-text-primary: var(--text-primary);
    --color-text-secondary: var(--text-secondary);
    --color-text-tertiary: var(--text-tertiary);
    --color-text-muted: var(--text-muted);
    
    /* === BORDERS === */
    --border-subtle: #1F2933;
    --border-default: #374151;
    --border-strong: #4B5563;
    
    /* Legacy aliases */
    --color-border-subtle: var(--border-subtle);
    --color-border-default: var(--border-default);
    
    /* === BRAND ACCENT (Cyan) === */
    --accent: #27C5FF;
    --accent-light: #60D9FF;
    --accent-muted: #22d3ee;
    --accent-bg: rgba(39, 197, 255, 0.08);
    --accent-border: rgba(39, 197, 255, 0.2);
    --accent-glow: rgba(39, 197, 255, 0.15);
    
    /* Primary alias for accent */
    --color-primary: var(--accent);
    --color-primary-hover: var(--accent-light);
    --color-primary-muted: rgba(39, 197, 255, 0.15);
    --color-primary-subtle: var(--accent-bg);
    
    /* === STATUS COLORS === */
    --status-success: #4ADE80;
    --status-success-bg: rgba(74, 222, 128, 0.08);
    --status-success-border: rgba(74, 222, 128, 0.2);
    
    --status-warning: #FBBF24;
    --status-warning-bg: rgba(251, 191, 36, 0.08);
    --status-warning-border: rgba(251, 191, 36, 0.2);
    
    --status-error: #F97373;
    --status-error-bg: rgba(249, 115, 115, 0.08);
    --status-error-border: rgba(249, 115, 115, 0.2);
    
    /* Legacy status aliases */
    --color-accent-success: var(--status-success);
    --color-accent-success-muted: var(--status-success-bg);
    --color-accent-warning: var(--status-warning);
    --color-accent-warning-muted: var(--status-warning-bg);
    --color-negative: var(--status-error);
    --color-negative-muted: var(--status-error-bg);
    
    /* === ICONS === */
    --color-icon-inactive: #6B7280;
    --color-icon-active: #9CA3AF;
    
    /* === BRAND GRADIENT === */
    --gradient-brand: linear-gradient(
        135deg,
        #ffffff 0%,
        #ffffff 40%,
        #60D9FF 70%,
        #27C5FF 100%
    );
    
    /* === GLASS EFFECTS === */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-highlight: rgba(255, 255, 255, 0.08);
    
    /* === TYPOGRAPHY === */
    --font-family-primary: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-family-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Font sizes */
    --text-title-size: 17px;
    --text-subtitle-size: 14px;
    --text-body-size: 14px;
    --text-caption-size: 12px;
    --text-micro-size: 11px;
    
    /* Font weights */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Line heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.65;
    
    /* Letter spacing */
    --letter-spacing-tight: -0.01em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    
    /* === SPACING SCALE (4px base) === */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    
    /* === BORDER RADIUS === */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;
    
    /* === SHADOWS === */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-glow-primary: 0 0 20px rgba(39, 197, 255, 0.25);
    --shadow-glow-success: 0 0 20px rgba(74, 222, 128, 0.25);
    
    /* === TRANSITIONS === */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* === Z-INDEX SCALE === */
    --z-base: 0;
    --z-elevated: 10;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
    --z-player: 500;
}

/* ============================================
   GLOBAL BASE STYLES
   ============================================ */

* {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   BRAND TEXT EFFECT - PRISMATIC GRADIENT
   ============================================ */

.prismatic-text {
    /* Fallback color */
    color: var(--text-primary);

    /* Clean white-to-accent gradient for branding */
    background: var(--gradient-brand);
    background-size: 100% 100%;
    background-position: 100% 50%;

    /* Clip background to text */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* Prevent text wrapping */
    white-space: nowrap;

    /* Subtle glow effect */
    filter: drop-shadow(0 1px 2px var(--accent-glow));
}

/* ============================================
   LIQUID GLASS TEXT EFFECT - V3
   ============================================
   Apple Liquid Glass aesthetic for logo text.
   Based on research from:
   - liquid-web library (SVG displacement filters)
   - liquid-glass-svelte (edge blur differentiation)
   - Apple WWDC 2025 design language
   
   Key characteristics of Apple's Liquid Glass:
   1. DIFFERENTIAL BLUR - edges blur differently than center
   2. REFRACTION SIMULATION - light bends through glass
   3. EDGE THICKNESS - visible "glass thickness" at edges
   4. SPECULAR HIGHLIGHTS - sharp light reflections
   5. CHROMATIC ABERRATION - rainbow prism at edges
   6. INTERNAL DEPTH - sense of volume inside
   
   This version uses SVG filters + CSS layers for true depth.
   ============================================ */

/* 
 * LIQUID GLASS TEXT - Main Container
 * Uses a wrapper approach for multi-layer depth
 */
.liquid-glass-text {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    
    /* Font optimization for glass effect */
    letter-spacing: -0.02em;
    font-weight: 700;
    
    /* Fallback color */
    color: var(--text-primary);
    
    /* 
     * PRIMARY GLASS LAYER
     * Multi-gradient creates internal refraction illusion
     */
    background: 
        /* Layer 1: TOP SPECULAR - Sharp highlight from light source */
        linear-gradient(
            158deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.98) 5%,
            rgba(255, 255, 255, 0.85) 12%,
            rgba(255, 255, 255, 0.5) 22%,
            rgba(255, 255, 255, 0.15) 35%,
            transparent 50%
        ),
        /* Layer 2: INTERNAL CAUSTIC - Light refraction inside glass */
        radial-gradient(
            ellipse 120% 60% at 25% 70%,
            rgba(255, 255, 255, 0.45) 0%,
            rgba(255, 255, 255, 0.2) 35%,
            rgba(255, 255, 255, 0.05) 60%,
            transparent 80%
        ),
        /* Layer 3: EDGE THICKNESS HIGHLIGHT - Top edge "glass rim" */
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.7) 2%,
            rgba(255, 255, 255, 0.3) 5%,
            transparent 12%
        ),
        /* Layer 4: CHROMATIC ABERRATION - Rainbow prism at bottom edge */
        linear-gradient(
            168deg,
            transparent 0%,
            transparent 55%,
            rgba(200, 230, 255, 0.08) 62%,
            rgba(150, 210, 255, 0.15) 70%,
            rgba(100, 190, 255, 0.3) 78%,
            rgba(60, 175, 255, 0.55) 86%,
            rgba(39, 197, 255, 0.8) 93%,
            rgba(30, 180, 255, 0.95) 100%
        ),
        /* Layer 5: BOTTOM EDGE SHADOW - Recessed depth */
        linear-gradient(
            180deg,
            transparent 0%,
            transparent 80%,
            rgba(10, 30, 60, 0.04) 92%,
            rgba(10, 30, 60, 0.08) 100%
        ),
        /* Layer 6: RIGHT EDGE THICKNESS - Side glass rim */
        linear-gradient(
            -90deg,
            rgba(39, 197, 255, 0.3) 0%,
            rgba(100, 200, 255, 0.15) 3%,
            rgba(200, 230, 255, 0.05) 8%,
            transparent 15%
        ),
        /* Layer 7: BASE GLASS MATERIAL - Core translucent fill */
        linear-gradient(
            176deg,
            rgba(255, 255, 255, 0.97) 0%,
            rgba(252, 254, 255, 0.93) 20%,
            rgba(248, 252, 255, 0.88) 45%,
            rgba(244, 250, 255, 0.85) 70%,
            rgba(238, 247, 255, 0.82) 100%
        );
    
    background-size: 100% 100%;
    
    /* Clip to text */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* 
     * 3D DEPTH SYSTEM
     * Layered shadows create volumetric glass appearance:
     */
    filter: 
        /* TOP BEVEL - Raised edge catching light */
        drop-shadow(0 -1px 0 rgba(255, 255, 255, 1))
        /* TOP INNER EDGE - Secondary highlight */
        drop-shadow(0 -0.5px 0 rgba(200, 230, 255, 0.8))
        /* BOTTOM LIFT SHADOW - Creates floating effect */
        drop-shadow(0 1px 0 rgba(0, 20, 50, 0.12))
        /* DEPTH SHADOW - Main volumetric shadow */
        drop-shadow(0 2px 3px rgba(0, 20, 50, 0.08))
        /* AMBIENT OCCLUSION - Soft ground shadow */
        drop-shadow(0 4px 8px rgba(0, 20, 50, 0.06))
        /* CYAN COLOR BLEED - Brand glow */
        drop-shadow(0 1px 10px rgba(39, 197, 255, 0.15))
        /* EDGE GLOW - Refracted light leak */
        drop-shadow(1px 2px 6px rgba(39, 197, 255, 0.1));
    
    /* Smooth rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    
    /* Hover transition */
    transition: filter 0.25s ease, transform 0.25s ease;
}

/* 
 * SPECULAR REFLECTION LAYER (::before)
 * Creates the sharp "hotspot" reflection you see on glass
 * Positioned slightly offset for 3D parallax effect
 */
.liquid-glass-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    
    /* Sharp specular highlight */
    background: 
        /* Primary specular hotspot */
        linear-gradient(
            162deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.7) 8%,
            rgba(255, 255, 255, 0.35) 18%,
            rgba(255, 255, 255, 0.1) 30%,
            transparent 45%
        ),
        /* Secondary bounce light from bottom */
        linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.04) 15%,
            transparent 30%
        ),
        /* Left edge rim light */
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.15) 0%,
            transparent 10%
        );
    
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.7;
    
    /* Slight offset for depth */
    transform: translate(-0.3px, -0.3px);
    
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* 
 * INTERNAL GLOW LAYER (::after)
 * Creates sense of light trapped inside the glass
 * Simulates subsurface scattering
 */
.liquid-glass-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    
    /* Internal luminescence */
    background: 
        /* Center glow - light trapped inside */
        radial-gradient(
            ellipse 90% 70% at 40% 35%,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0.25) 30%,
            rgba(255, 255, 255, 0.08) 55%,
            transparent 75%
        ),
        /* Edge definition - darker outline for thickness */
        linear-gradient(
            180deg,
            transparent 0%,
            transparent 85%,
            rgba(39, 197, 255, 0.08) 95%,
            rgba(39, 197, 255, 0.12) 100%
        );
    
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    pointer-events: none;
    mix-blend-mode: soft-light;
    opacity: 0.6;
    
    /* Opposite offset creates thickness */
    transform: translate(0.2px, 0.2px);
    
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* 
 * HOVER STATE
 * Enhanced luminosity and subtle lift
 */
.liquid-glass-text:hover {
    filter: 
        drop-shadow(0 -1px 0 rgba(255, 255, 255, 1))
        drop-shadow(0 -0.5px 0 rgba(200, 230, 255, 0.9))
        drop-shadow(0 1.5px 0 rgba(0, 20, 50, 0.15))
        drop-shadow(0 3px 5px rgba(0, 20, 50, 0.1))
        drop-shadow(0 6px 12px rgba(0, 20, 50, 0.08))
        drop-shadow(0 2px 15px rgba(39, 197, 255, 0.25))
        drop-shadow(2px 3px 8px rgba(39, 197, 255, 0.15));
    
    transform: translateY(-0.5px);
}

.liquid-glass-text:hover::before {
    opacity: 0.85;
    transform: translate(-0.5px, -0.5px);
}

.liquid-glass-text:hover::after {
    opacity: 0.75;
    transform: translate(0.3px, 0.3px);
}

/* 
 * SVG FILTER ENHANCED VERSION
 * Uses SVG filter for true refraction effect in supported browsers
 * Apply .liquid-glass-text--enhanced for SVG filter version
 */
.liquid-glass-text--enhanced {
    /* Apply SVG filter for true glass distortion */
    filter: 
        url(#liquid-glass-text-filter)
        drop-shadow(0 -1px 0 rgba(255, 255, 255, 1))
        drop-shadow(0 1px 0 rgba(0, 20, 50, 0.12))
        drop-shadow(0 2px 4px rgba(0, 20, 50, 0.08))
        drop-shadow(0 1px 10px rgba(39, 197, 255, 0.15));
}

.liquid-glass-text--enhanced:hover {
    filter: 
        url(#liquid-glass-text-filter)
        drop-shadow(0 -1px 0 rgba(255, 255, 255, 1))
        drop-shadow(0 1.5px 0 rgba(0, 20, 50, 0.15))
        drop-shadow(0 3px 6px rgba(0, 20, 50, 0.1))
        drop-shadow(0 2px 15px rgba(39, 197, 255, 0.25));
}

/* 
 * ALTERNATIVE: Simple depth variant
 * Uses simpler SVG filter for better performance
 */
.liquid-glass-text--depth {
    filter: url(#liquid-glass-depth);
}

/* Action gradient for loading states */
.prismatic-action {
    background: var(--gradient-brand);
    background-size: 200% 100%;
}

/* Subtle ambient background - for containers that need depth */
.prismatic-blob-bg {
    position: relative;
    overflow: hidden;
}

/* Subtle ambient glow - top-left */
.prismatic-blob-bg::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -40%;
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle at 35% 35%,
        var(--accent-bg) 0%,
        transparent 60%
    );
    filter: blur(40px);
    mix-blend-mode: screen;
    pointer-events: none;
    opacity: 0.6;
}

/* Subtle ambient glow - bottom-right */
.prismatic-blob-bg::after {
    content: '';
    position: absolute;
    bottom: -40%;
    right: -40%;
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle at 65% 65%,
        var(--accent-bg) 0%,
        transparent 60%
    );
    filter: blur(40px);
    mix-blend-mode: screen;
    pointer-events: none;
    opacity: 0.5;
}

/* ============================================
   LOGO STYLING
   ============================================ */

.prismatic-logo {
    filter: drop-shadow(0 2px 8px var(--accent-glow)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
    transition: filter 0.2s ease;
}

.prismatic-logo:hover {
    filter: drop-shadow(0 4px 12px var(--accent-glow)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

/* ============================================
   BADGE SYSTEM - UNIFIED DESIGN
   ============================================ */

/* Base Badge - Neutral, understated */
.source-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    
    /* Neutral by default */
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    
    transition: all 0.15s ease;
}

/* Source type variants - subtle differentiation */
.source-badge.email {
    color: var(--text-secondary);
}

.source-badge.podcast {
    color: var(--text-secondary);
}

.source-badge.blog {
    color: var(--text-secondary);
}

/* Role Badge - for author, host, guest, etc. */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    
    /* Neutral styling */
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    
    transition: all 0.15s ease;
}

/* Signal Badges - Recommendation indicators */
.recommendation-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.recommendation-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    
    /* Neutral base styling */
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    
    transition: all 0.15s ease;
}

/* High-value signals get accent treatment */
.recommendation-badge[data-badge-type="high-interest"] {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    color: var(--accent-light);
}

/* Other signal types - neutral with subtle differentiation */
.recommendation-badge[data-badge-type="interest"],
.recommendation-badge[data-badge-type="relevant"],
.recommendation-badge[data-badge-type="matches-interests"] {
    color: var(--text-secondary);
}

.recommendation-badge[data-badge-type="recent"] {
    background: var(--status-warning-bg);
    border-color: var(--status-warning-border);
    color: var(--status-warning);
}

.recommendation-badge[data-badge-type="trusted-author"],
.recommendation-badge[data-badge-type="known-author"] {
    color: var(--text-secondary);
}

.recommendation-badge[data-badge-type="quality-source"] {
    background: var(--status-success-bg);
    border-color: var(--status-success-border);
    color: var(--status-success);
}

.recommendation-badge[data-badge-type="new-perspective"],
.recommendation-badge[data-badge-type="diverse"] {
    color: var(--text-secondary);
}

/* Default fallback */
.recommendation-badge:not([data-badge-type]) {
    color: var(--text-secondary);
}

/* Hover effect - subtle */
.recommendation-badge:hover {
    background: var(--bg-hover);
    border-color: var(--border-default);
}

/* ============================================
   SCORE PILL - UNIFIED DESIGN
   ============================================ */

.score-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: help;
    flex-shrink: 0;
    white-space: nowrap;
    
    /* Neutral base */
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    
    transition: all 0.15s ease;
}

.score-pill:hover {
    background: var(--bg-hover);
    border-color: var(--border-default);
}

.score-pill-label {
    display: none;
}

.score-pill-value {
    font-weight: 600;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Score color coding */
.score-pill[data-score-range="high"] {
    background: var(--status-success-bg);
    border-color: var(--status-success-border);
}

.score-pill[data-score-range="high"] .score-pill-value {
    color: var(--status-success);
}

.score-pill[data-score-range="medium"] {
    background: var(--status-warning-bg);
    border-color: var(--status-warning-border);
}

.score-pill[data-score-range="medium"] .score-pill-value {
    color: var(--status-warning);
}

.score-pill[data-score-range="low"] .score-pill-value {
    color: var(--text-tertiary);
}

/* ============================================
   BUTTON STYLES - UNIFIED
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-subtitle-size);
    font-weight: var(--font-weight-medium);
    font-family: inherit;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary button */
.btn-primary {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-light);
    border-color: var(--accent-light);
    box-shadow: var(--shadow-glow-primary);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

/* Secondary button */
.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

/* Ghost button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* ============================================
   FORM ELEMENTS - UNIFIED
   ============================================ */

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: var(--text-body-size);
    font-family: inherit;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

.input:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

/* ============================================
   CARD STYLES - UNIFIED
   ============================================ */

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition-fast);
}

.card:hover {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

.card-header {
    margin-bottom: var(--space-3);
}

.card-title {
    font-size: var(--text-title-size);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    line-height: var(--line-height-tight);
}

.card-body {
    color: var(--text-secondary);
    font-size: var(--text-body-size);
    line-height: var(--line-height-relaxed);
}

/* ============================================
   CONTENT LIST & CONTENT ITEM STYLES
   ============================================
   Used on author profile, source detail, and other
   pages that display content items in a list format.
   ============================================ */

.content-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.content-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition-fast);
}

.content-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

.content-item-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.content-item-title {
    font-size: var(--text-title-size);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-2);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.content-item-title-wrapper {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

.content-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.content-item-title a:hover {
    color: var(--accent);
}

.content-item-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    font-size: var(--text-caption-size);
    color: var(--text-tertiary);
}

.content-item-meta a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.content-item-meta a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.content-item-meta span {
    color: var(--text-muted);
}

.content-item-summary {
    font-size: var(--text-body-size);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
    margin-top: var(--space-2);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Content list section container (used in source_detail and author_profile) */
.content-list-section {
    background: var(--bg-surface);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.content-list-section .content-list {
    gap: var(--space-3);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text colors */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-tertiary { color: var(--text-tertiary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-accent { color: var(--accent) !important; }
.text-success { color: var(--status-success) !important; }
.text-warning { color: var(--status-warning) !important; }
.text-error { color: var(--status-error) !important; }

/* Background colors */
.bg-base { background: var(--bg-base) !important; }
.bg-surface { background: var(--bg-surface) !important; }
.bg-elevated { background: var(--bg-elevated) !important; }

/* Flexbox utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* Spacing utilities */
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }

/* Line clamp utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .prismatic-text {
        background-position: 100% 50%;
    }

    .prismatic-blob-bg::before,
    .prismatic-blob-bg::after {
        opacity: 0.85;
    }

    /* Liquid glass text - already static, no animation to disable */
    .liquid-glass-text,
    .liquid-glass-text::before,
    .liquid-glass-text::after {
        transition: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .prismatic-text,
    .liquid-glass-text {
        color: #333 !important;
        -webkit-text-fill-color: #333 !important;
        background: none !important;
        filter: none !important;
        animation: none !important;
    }

    .liquid-glass-text::before,
    .liquid-glass-text::after {
        display: none !important;
    }
}
