/* 🎨 DCLO Stylesheet - Premium Adaptive Design System */

:root {
    /* 🪐 Light Mode Tokens (Default) */
    --bg-main: #F8FAFC; /* Clean slate-white */
    --bg-header: rgba(248, 250, 252, 0.85);
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(15, 23, 42, 0.08);
    
    --primary: #0284C7; /* Premium sky blue */
    --primary-gradient: linear-gradient(135deg, #0EA5E9 0%, #22D3EE 100%);
    --primary-glow: rgba(14, 165, 233, 0.15);
    --accent: #4F46E5; /* Deep indigo */
    --accent-gradient: linear-gradient(135deg, #4F46E5 0%, #0EA5E9 100%);
    --success: #10B981; /* Emerald green */
    --danger: #EF4444; /* Coral red */
    --warning: #F59E0B; /* Amber */
    
    --text-primary: #0F172A; /* Deep charcoal */
    --text-secondary: #475569; /* Slate grey */
    --text-muted: #94A3B8; /* Light slate grey */
    --input-bg: rgba(255, 255, 255, 0.9);
    --shadow-main: 0 20px 40px rgba(15, 23, 42, 0.05);
    --shadow-hover: 0 30px 60px rgba(15, 23, 42, 0.1);
    --slider-track: rgba(15, 23, 42, 0.05);
    --glow-opacity: 0.25;
    
    /* Transition speeds */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 🪐 Dark Mode Tokens (Active when body has .dark-theme) */
body.dark-theme {
    --bg-main: #0B0F19; /* Deep Space Slate */
    --bg-header: rgba(11, 15, 25, 0.7);
    --card-bg: rgba(20, 27, 45, 0.4);
    --card-border: rgba(255, 255, 255, 0.08);
    
    --primary: #00F2FE; /* Neon Cyan */
    --primary-gradient: linear-gradient(135deg, #4FACFE 0%, #00F2FE 100%);
    --primary-glow: rgba(0, 242, 254, 0.35);
    --accent: #4FACFE; /* Soft Electric Blue */
    --accent-gradient: linear-gradient(135deg, #FF007A 0%, #4FACFE 100%);
    --success: #00FF87; /* Neon Mint */
    --danger: #FF007A; /* Magenta */
    --warning: #F5A623; /* Gold */
    
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --input-bg: rgba(255, 255, 255, 0.02);
    --shadow-main: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.45);
    --slider-track: rgba(255, 255, 255, 0.05);
    --glow-opacity: 0.15;
}

/* 🌀 Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

h1, h2, h3, h4, .logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    transition: color 0.4s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 720px;
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ✨ Glow Background Spheres (Highly Visual Layout) */
.glow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: var(--glow-opacity);
    mix-blend-mode: multiply;
    transition: opacity 0.5s ease;
}

body.dark-theme .glow-sphere {
    mix-blend-mode: screen;
}

.glow-sphere-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: rotateSphere 20s linear infinite;
}

.glow-sphere-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    bottom: 20%;
    left: -200px;
    animation: rotateSphere 25s linear infinite reverse;
}

.glow-sphere-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--warning) 0%, transparent 70%);
    top: 40%;
    right: 15%;
}

@keyframes rotateSphere {
    0% { transform: rotate(0deg) translate(0, 0); }
    50% { transform: rotate(180deg) translate(40px, -40px); }
    100% { transform: rotate(360deg) translate(0, 0); }
}

/* 🏢 Header Navigation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-header);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo-icon {
    color: var(--primary);
    stroke-width: 2.5;
    animation: pulseLogo 3s ease-in-out infinite;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 8px var(--primary-glow)); }
}

.logo-text {
    font-size: 24px;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--primary);
    font-weight: 300;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition-smooth);
    font-size: 15px;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 20px var(--primary-glow);
    font-weight: 700;
}

body.dark-theme .nav-btn-primary {
    color: #0b0f19;
}

.nav-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.35);
    color: #ffffff;
}

body.dark-theme .nav-btn-primary:hover {
    color: #0b0f19;
}

.nav-btn-secondary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary) !important;
    padding: 10px 22px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.nav-btn-secondary:hover {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

body.dark-theme .nav-btn-secondary:hover {
    color: #0b0f19 !important;
}

.nav-link-dashboard {
    background: none;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-link-dashboard:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(14, 165, 233, 0.08);
    transform: rotate(15deg) scale(1.05);
}

/* 🖼️ Milky Glassmorphic Cards (Interactive Hover effects) */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* 🚀 Hero Section */
.hero-section {
    padding: 180px 0 100px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-text-content h1 {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    font-size: 19px;
    margin-bottom: 40px;
    color: var(--text-secondary);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(14, 165, 233, 0.05);
    border: 1px solid rgba(14, 165, 233, 0.15);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.05);
}

.badge-accent {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.15);
    background-color: rgba(16, 185, 129, 0.05);
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

/* 🗳️ Campaign Detector Box */
.campaign-tag-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(14, 165, 233, 0.02);
    border: 1px dashed rgba(14, 165, 233, 0.2);
    padding: 14px 20px;
    border-radius: var(--border-radius-md);
    max-width: 480px;
    transition: var(--transition-smooth);
}

.campaign-tag-box.active {
    border-color: var(--primary);
    background-color: rgba(14, 165, 233, 0.05);
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background-color: var(--text-muted);
    border-radius: 50%;
    display: inline-block;
    transition: var(--transition-smooth);
}

.campaign-tag-box.active .pulse-indicator {
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.5; }
}

.detector-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: monospace;
}

/* 🖼️ Hero Visual Index Display (Modern Interactive widgets) */
.visual-card {
    padding: 30px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    opacity: 0.3;
}

.window-dots span:nth-child(1) { background-color: var(--danger); opacity: 1; }
.window-dots span:nth-child(2) { background-color: var(--warning); opacity: 1; }
.window-dots span:nth-child(3) { background-color: var(--success); opacity: 1; }

.card-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 700;
}

.metric-track {
    margin-bottom: 20px;
    padding: 14px;
    border-radius: var(--border-radius-md);
    background-color: rgba(15, 23, 42, 0.01);
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.metric-track.active {
    border-color: rgba(14, 165, 233, 0.15);
    background-color: rgba(14, 165, 233, 0.03);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.03);
}

body.dark-theme .metric-track {
    background-color: rgba(255,255,255,0.01);
}

.metric-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.metric-track.active .metric-label {
    color: var(--primary);
}

.metric-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(15, 23, 42, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

body.dark-theme .metric-bar {
    background-color: rgba(255, 255, 255, 0.05);
}

.bar-fill {
    height: 100%;
    background: var(--text-muted);
    border-radius: 10px;
    display: block;
}

.metric-track.active .bar-fill {
    background: var(--primary);
}

.metric-bar-animated {
    width: 100%;
    height: 6px;
    background-color: rgba(15, 23, 42, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

body.dark-theme .metric-bar-animated {
    background-color: rgba(255, 255, 255, 0.05);
}

.bar-fill-animated {
    height: 100%;
    width: 80%;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: block;
    position: relative;
    animation: slideProgress 4s infinite ease-in-out;
}

@keyframes slideProgress {
    0%, 100% { width: 45%; }
    50% { width: 85%; }
}

.affordance-icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 30px;
}

.affordance-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px;
    background-color: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition-smooth);
}

body.dark-theme .affordance-badge {
    background-color: rgba(255, 255, 255, 0.02);
}

.affordance-badge:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    color: var(--text-primary);
}

.affordance-badge i {
    color: var(--primary);
    stroke-width: 2.2;
}

/* 📖 The Study Layout Grid */
.about-section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-tag {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: inline-block;
}

.section-lead {
    font-size: 17px;
    max-width: 600px;
    margin-top: 16px;
}

.grid {
    display: grid;
    gap: 30px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-2-1 {
    grid-template-columns: 1.3fr 0.7fr;
}

.study-card {
    padding: 36px 30px;
    position: relative;
}

.study-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 24px;
}

.paper-1-color { background-color: rgba(14, 165, 233, 0.08); color: var(--primary); border: 1px solid rgba(14, 165, 233, 0.2); }
.paper-2-color { background-color: rgba(79, 70, 229, 0.08); color: var(--accent); border: 1px solid rgba(79, 70, 229, 0.2); }
.paper-3-color { background-color: rgba(16, 185, 129, 0.08); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }

.study-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.study-card p {
    font-size: 14.5px;
    margin-bottom: 24px;
}

.card-bullet-list {
    list-style: none;
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
}

.card-bullet-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.bullet-check {
    width: 14px;
    height: 14px;
    color: var(--success);
}

/* 🍩 Doughnut Interactive Graphics (Vibrant Light Mode Contrast) */
.doughnut-section {
    padding: 100px 0;
}

.doughnut-container-svg {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.doughnut-svg {
    width: 100%;
    height: auto;
}

.circle-ceiling {
    fill: none;
    stroke: rgba(239, 68, 68, 0.25); /* Transparent Danger ceiling */
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
}

.circle-foundation {
    fill: none;
    stroke: rgba(2, 132, 199, 0.25); /* Transparent Primary foundation */
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
}

.circle-core {
    fill: #ffffff;
    stroke: var(--card-border);
    stroke-width: 1;
    transition: fill 0.4s ease;
}

body.dark-theme .circle-core {
    fill: #0d1324;
}

.svg-label-core {
    font-family: var(--font-heading);
    transition: fill 0.3s ease, font-size 0.3s ease;
}

.svg-label-core.title {
    fill: var(--text-muted);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.svg-label-sub.subtitle {
    fill: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.svg-label-value.value {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    fill: var(--success);
    transition: fill 0.3s ease;
}

.svg-label-boundary {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 8px;
    letter-spacing: 0.06em;
    opacity: 0.55;
    fill: var(--text-muted);
    pointer-events: none;
}

.svg-label-boundary.ceiling { 
    fill: var(--danger); 
}

.svg-label-boundary.foundation { 
    fill: var(--primary); 
}

/* 🍩 Radial Text Labels for Slices */
.doughnut-label {
    font-family: var(--font-heading);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.03em;
    pointer-events: none;
    transition: fill 0.25s ease, opacity 0.25s ease;
    opacity: 0.6;
}

.doughnut-group:hover .doughnut-label {
    opacity: 1;
    font-weight: 900;
}

.doughnut-group[data-type="social"] .doughnut-label {
    fill: var(--text-secondary);
}

.doughnut-group[data-type="social"]:hover .doughnut-label {
    fill: var(--primary);
}

.doughnut-group[data-type="ecological"] .doughnut-label {
    fill: var(--text-secondary);
}

.doughnut-group[data-type="ecological"]:hover .doughnut-label {
    fill: var(--warning);
}

/* 🍩 Dynamic Segmented SVG Slices styling */
.doughnut-slice {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Safe Space portions */
.doughnut-slice.social-safe {
    fill: rgba(16, 185, 129, 0.12); /* transparent green */
    stroke: rgba(16, 185, 129, 0.35);
    stroke-width: 1.2;
}

.doughnut-slice.eco-safe {
    fill: rgba(16, 185, 129, 0.15); /* transparent green */
    stroke: rgba(16, 185, 129, 0.45);
    stroke-width: 1.2;
}

/* Deficit / Shortfall wedges (Social) */
.doughnut-slice.social-deficit {
    fill: rgba(239, 68, 68, 0.6); /* coral red */
    stroke: rgba(239, 68, 68, 0.85);
    stroke-width: 1;
}

body.dark-theme .doughnut-slice.social-deficit {
    fill: rgba(255, 0, 122, 0.6);
    stroke: var(--danger);
}

/* Overshoot wedges (Ecological) */
.doughnut-slice.eco-overshoot {
    fill: rgba(245, 158, 11, 0.6); /* amber orange */
    stroke: rgba(245, 158, 11, 0.85);
    stroke-width: 1;
}

body.dark-theme .doughnut-slice.eco-overshoot {
    fill: rgba(245, 166, 35, 0.6);
    stroke: var(--warning);
}

/* Interactive group hovers */
.doughnut-group {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.doughnut-group:hover {
    transform: scale(1.025);
    transform-origin: 250px 250px;
}

.doughnut-group:hover .social-safe {
    fill: rgba(16, 185, 129, 0.25);
    stroke: var(--success);
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.3));
}

.doughnut-group:hover .eco-safe {
    fill: rgba(16, 185, 129, 0.3);
    stroke: var(--success);
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.35));
}

.doughnut-group:hover .social-deficit {
    fill: rgba(239, 68, 68, 0.85);
    stroke: var(--danger);
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.5));
}

body.dark-theme .doughnut-group:hover .social-deficit {
    fill: rgba(255, 0, 122, 0.85);
    filter: drop-shadow(0 0 8px rgba(255, 0, 122, 0.5));
}

.doughnut-group:hover .eco-overshoot {
    fill: rgba(245, 158, 11, 0.85);
    stroke: var(--warning);
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

body.dark-theme .doughnut-group:hover .eco-overshoot {
    fill: rgba(245, 166, 35, 0.85);
    filter: drop-shadow(0 0 8px rgba(245, 166, 35, 0.5));
}

/* 🍩 Dynamic Detail Card Styling */
.doughnut-detail-card {
    padding: 24px;
    border-radius: var(--border-radius-md);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: var(--transition-smooth);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.doughnut-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(2, 132, 199, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.detail-placeholder {
    transition: opacity 0.25s ease;
}

.detail-content {
    transition: opacity 0.25s ease;
}

.detail-header {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.detail-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 12px;
}

.detail-badge.social {
    background: rgba(2, 132, 199, 0.12);
    color: var(--primary);
}

.detail-badge.ecological {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.detail-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.detail-status.deficit .dot {
    background: var(--danger);
    box-shadow: 0 0 6px var(--danger);
}

.detail-status.overshoot .dot {
    background: var(--warning);
    box-shadow: 0 0 6px var(--warning);
}

.detail-status.safe .dot {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.detail-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.detail-dclo-box {
    padding: 12px 14px;
    border-radius: var(--border-radius-sm);
    margin-top: 8px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.detail-dclo-box.social {
    background: rgba(2, 132, 199, 0.05);
    border-left: 3px solid var(--primary);
}

.detail-dclo-box.ecological {
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid var(--warning);
}

.detail-dclo-box.safe {
    background: rgba(16, 185, 129, 0.05);
    border-left: 3px solid var(--success);
}

.doughnut-text h2 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 24px;
}

.doughnut-text p {
    font-size: 16px;
    margin-bottom: 30px;
}

.doughnut-factors {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.doughnut-factor-card {
    background-color: rgba(15, 23, 42, 0.01);
    border: 1px solid var(--card-border);
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
}

body.dark-theme .doughnut-factor-card {
    background-color: rgba(255,255,255,0.01);
}

.doughnut-factor-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin-bottom: 6px;
}

.doughnut-factor-card p {
    font-size: 13px;
    margin-bottom: 0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot.shortfall { background-color: var(--primary); }
.dot.overshoot { background-color: var(--danger); }

/* 📋 Multi-Step Survey Wizard */
.survey-section {
    padding: 100px 0;
    background-color: rgba(15, 23, 42, 0.02);
    transition: background-color 0.4s ease;
}

body.dark-theme .survey-section {
    background-color: rgba(11, 15, 25, 0.5);
}

.survey-card {
    padding: 40px;
}

.survey-progress-wrapper {
    margin-bottom: 36px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
}

#survey-step-title {
    color: var(--primary);
}

.progress-track {
    width: 100%;
    height: 6px;
    background-color: var(--slider-track);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.survey-step {
    display: none;
    animation: stepTransition 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.survey-step.active {
    display: block;
}

@keyframes stepTransition {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    margin-bottom: 30px;
}

.step-header h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.step-header p {
    font-size: 14.5px;
}

/* 📝 Forms Elements (Visual and highly responsive highlights) */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.form-control {
    width: 100%;
    height: 48px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 0 18px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition-smooth);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 14px rgba(14, 165, 233, 0.15);
}

body.dark-theme .form-control:focus {
    background: rgba(0, 242, 254, 0.02);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.1);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    padding-right: 48px;
}

body.dark-theme select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239CA3AF' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
}

select.form-control option {
    background-color: var(--bg-main);
    color: var(--text-primary);
}

.form-help {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* 🔘 Checkboxes & Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 10px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    background-color: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 5px;
    display: inline-block;
    position: relative;
    transition: var(--transition-smooth);
    margin-top: 2px;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: rgba(14, 165, 233, 0.4);
    transform: scale(1.05);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

body.dark-theme .checkmark:after {
    border-color: #0b0f19;
}

.label-text {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.4;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.checkbox-container input:checked ~ .label-text {
    color: var(--text-primary);
}

/* 🎚️ Range Sliders (Interactive hover outlines) */
.slider-group {
    background-color: rgba(15, 23, 42, 0.01);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition-smooth);
}

body.dark-theme .slider-group {
    background-color: rgba(255, 255, 255, 0.01);
}

.slider-group:hover {
    border-color: rgba(14, 165, 233, 0.25);
    background-color: rgba(14, 165, 233, 0.02);
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.slider-header label {
    margin-bottom: 0;
}

.slider-value {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--primary);
    font-family: monospace;
}

.slider-description {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-bottom: 20px;
    font-style: italic;
}

.survey-slider {
    width: 100%;
    height: 6px;
    background-color: var(--slider-track);
    outline: none;
    border-radius: 10px;
    appearance: none;
    margin-bottom: 12px;
}

.survey-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-gradient);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: var(--transition-smooth);
}

.survey-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* 📜 Ethics Scroll Box */
.consent-box {
    background-color: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

body.dark-theme .consent-box {
    background-color: rgba(0, 0, 0, 0.2);
}

.scroll-box {
    max-height: 200px;
    overflow-y: auto;
}

.scroll-box::-webkit-scrollbar {
    width: 6px;
}

.scroll-box::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-box::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    opacity: 0.3;
    border-radius: 10px;
}

.consent-box h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--primary);
}

.consent-box p {
    font-size: 12px.5;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* 🔘 Interactive Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    border-top: 1px solid var(--card-border);
    padding-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--border-radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-lg {
    height: 54px;
    padding: 0 32px;
    font-size: 15px;
}

.btn-sm {
    height: 38px;
    padding: 0 16px;
    font-size: 12.5px;
    border-radius: var(--border-radius-sm);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 8px 20px var(--primary-glow);
}

body.dark-theme .btn-primary {
    color: #0b0f19;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.35);
}

.btn-secondary {
    background-color: var(--input-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

.btn-secondary:hover {
    background-color: #ffffff;
    border-color: rgba(14, 165, 233, 0.3);
}

.btn-accent {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.35);
}

.btn-success {
    background-color: var(--success);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

body.dark-theme .btn-success {
    color: #0b0f19;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.35);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

.w-100 {
    width: 100%;
}

/* 🎉 Survey Success View */
.success-view {
    text-align: center;
    padding: 20px 0;
    animation: stepTransition 0.5s ease forwards;
}

.success-icon {
    width: 64px;
    height: 64px;
    color: var(--success);
    stroke-width: 1.5;
    margin-bottom: 24px;
}

.success-view h3 {
    font-size: 26px;
    margin-bottom: 12px;
}

.success-view p {
    font-size: 15.5px;
    max-width: 480px;
    margin: 0 auto 30px;
}

.submit-note-box {
    display: flex;
    gap: 12px;
    background-color: rgba(239, 68, 68, 0.02);
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    margin-top: 24px;
    text-align: left;
}

.submit-alert-icon {
    color: var(--danger);
    stroke-width: 2.2;
    min-width: 20px;
}

.submit-alert-text {
    font-size: 12.5px;
    color: var(--text-secondary);
}

/* 🎯 Google Ads Conversion Sandbox Box */
.ads-pixel-fire-card {
    background-color: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

body.dark-theme .ads-pixel-fire-card {
    background-color: rgba(0,0,0,0.3);
}

.pixel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.pixel-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.pixel-status.active {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.pixel-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ads-pixel-fire-card pre {
    font-family: monospace;
    font-size: 11px;
    color: var(--primary);
    white-space: pre-wrap;
    background: transparent;
    border: none;
    padding: 0;
}

/* 📈 Researcher Dashboard Panel */
.dashboard-section {
    padding: 140px 0 100px;
    background-color: var(--bg-main);
    animation: stepTransition 0.5s ease forwards;
    transition: background-color 0.4s ease;
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-header h2 {
    font-size: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-header h2 i {
    color: var(--primary);
}

.stats-grid {
    margin-bottom: 40px;
}

.stat-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.panel-card {
    padding: 30px;
    margin-bottom: 30px;
}

.panel-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.panel-desc {
    font-size: 13.5px;
    margin-bottom: 24px;
}

.simulation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.log-viewer h4, .demographic-breakdown h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 700;
}

.log-box {
    height: 150px;
    background-color: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 16px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 11px;
}

body.dark-theme .log-box {
    background-color: rgba(0, 0, 0, 0.3);
}

.log-entry {
    margin-bottom: 6px;
    font-weight: 600;
}

.log-entry.system { color: var(--text-secondary); }
.log-entry.ad { color: var(--accent); }
.log-entry.conv { color: var(--success); }

.export-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 8px 12px;
    background-color: rgba(15, 23, 42, 0.01);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
}

body.dark-theme .breakdown-item {
    background-color: rgba(255, 255, 255, 0.01);
}

.breakdown-count {
    font-weight: 700;
    color: var(--primary);
    font-family: monospace;
}

/* 📋 Live Data Preview Table (Responsive outlines and headers) */
.table-preview-card {
    padding: 30px;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.dashboard-table th {
    background-color: rgba(15, 23, 42, 0.02);
    border-bottom: 1px solid var(--card-border);
    padding: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

body.dark-theme .dashboard-table th {
    background-color: rgba(255, 255, 255, 0.02);
}

.dashboard-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-secondary);
    white-space: nowrap;
}

.dashboard-table tr:last-child td {
    border-bottom: none;
}

.dashboard-table tbody tr:hover {
    background-color: rgba(15, 23, 42, 0.01);
}

body.dark-theme .dashboard-table tr:hover {
    background-color: rgba(255,255,255,0.01);
}

/* 👣 Footer */
footer {
    padding: 60px 0;
    border-top: 1px solid var(--card-border);
    background-color: rgba(255, 255, 255, 0.85);
    transition: background-color 0.4s ease;
}

body.dark-theme footer {
    background-color: rgba(11, 15, 25, 0.9);
}

footer p {
    font-size: 13px;
    margin-bottom: 10px;
}

.footer-note {
    font-size: 11.5px;
    color: var(--text-muted);
    max-width: 800px;
    margin: 12px auto 0;
}

/* 📱 Responsive Adjustments */
@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-text-content {
        text-align: center;
    }
    
    .badge {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .campaign-tag-box {
        margin-left: auto;
        margin-right: auto;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-2-1 {
        grid-template-columns: 1fr;
    }
    
    .doughnut-section .hero-grid {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hero-text-content h1 {
        font-size: 40px;
    }
    
    .survey-card {
        padding: 24px;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* 📊 Matrix Table Mobile Optimization */
@media (max-width: 768px) {
    .matrix-table, .matrix-table thead, .matrix-table tbody, .matrix-table th, .matrix-table td, .matrix-table tr {
        display: block;
    }
    .matrix-table thead {
        display: none; /* Hide standard headers on mobile */
    }
    .matrix-table tr {
        margin-bottom: 16px;
        border: 1px solid var(--card-border);
        border-radius: var(--border-radius-md);
        padding: 12px;
        background-color: rgba(15, 23, 42, 0.01);
        overflow: hidden;
    }
    body.dark-theme .matrix-table tr {
        background-color: rgba(255, 255, 255, 0.01);
    }
    .matrix-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed var(--card-border);
        padding: 10px 0;
        text-align: right;
        font-size: 13px;
        white-space: normal;
    }
    .matrix-table tr td:first-child {
        display: block;
        width: 100% !important;
        text-align: left !important;
        padding: 10px 12px !important;
        font-weight: 700 !important;
        color: var(--primary) !important;
        background-color: rgba(14, 165, 233, 0.06) !important;
        border-bottom: 1px solid var(--card-border) !important;
        margin: -12px -12px 8px -12px !important;
        border-top-left-radius: var(--border-radius-md);
        border-top-right-radius: var(--border-radius-md);
    }
    body.dark-theme .matrix-table tr td:first-child {
        background-color: rgba(14, 165, 233, 0.12) !important;
    }
    .matrix-table td:last-child {
        border-bottom: none;
    }
    .matrix-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
        color: var(--text-primary);
        margin-right: 15px;
    }
    .matrix-table td:first-child::before {
        display: none !important;
    }
    .matrix-table td input[type="radio"] {
        margin: 0;
        transform: scale(1.15);
    }
    /* Hide desktop sublabel on mobile view to avoid duplication */
    .matrix-table td:has(input[type="radio"])::after {
        display: none !important;
    }
}

/* 📊 Research Dashboard Styles */
.dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 2px solid var(--card-border);
    padding-bottom: 12px;
    margin-bottom: 30px;
}
.tab-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
}
.tab-btn:hover {
    color: var(--primary);
    background-color: rgba(14, 165, 233, 0.05);
}
.tab-btn.active {
    color: #ffffff;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px var(--primary-glow);
}
body.dark-theme .tab-btn.active {
    color: #0b0f19;
}
.tab-panel {
    display: none;
    animation: stepTransition 0.5s ease forwards;
}
.tab-panel.active {
    display: block;
}

/* Dashboard controls and grid additions */
.dashboard-controls-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}
@media (max-width: 991px) {
    .dashboard-controls-grid {
        grid-template-columns: 1fr;
    }
}
.control-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.control-card h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--primary);
}
.stats-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 480px) {
    .stats-mini-grid {
        grid-template-columns: 1fr;
    }
}
.stat-delta {
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
    color: var(--success);
}
.stat-delta.negative {
    color: var(--danger);
}

.chart-card {
    display: flex;
    flex-direction: column;
}
.chart-container {
    position: relative;
    width: 100%;
    height: 320px;
    margin-top: 15px;
}
.font-sm {
    font-size: 12.5px !important;
}
.text-center {
    text-align: center;
}
.panel-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.loop-item-card {
    background-color: rgba(14, 165, 233, 0.02);
    border: 1px dashed var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 24px;
    margin-top: 24px;
    animation: stepTransition 0.4s ease forwards;
}
.loop-item-card h4 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 8px;
}
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 10px;
    background-color: var(--input-bg);
}
.chip-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--card-border);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}
body.dark-theme .chip-checkbox-label {
    background-color: rgba(255,255,255,0.02);
}
.chip-checkbox-label:hover {
    border-color: var(--primary);
}
.chip-checkbox-label input {
    cursor: pointer;
}

/* Heatmap cell styling */
.heatmap-cell {
    font-weight: 700;
    text-align: center;
}

/* Provenance and Integrity Styles */
.provenance-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.prov-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 1px dashed var(--card-border);
    padding-bottom: 8px;
}
.prov-row:last-child {
    border-bottom: none;
}
.prov-label {
    font-weight: 700;
    color: var(--text-secondary);
}
.prov-val {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-primary);
}
.verification-checks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.v-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--card-border);
    background-color: rgba(16, 185, 129, 0.02);
}
.v-check-item.failed {
    background-color: rgba(239, 68, 68, 0.02);
    border-color: rgba(239, 68, 68, 0.15);
}
.v-check-icon {
    font-weight: 800;
}
.v-check-icon.pass { color: var(--success); }
.v-check-icon.fail { color: var(--danger); }
.v-check-text {
    font-weight: 600;
    color: var(--text-primary);
}

.non-diagnostic-note {
    display: flex;
    gap: 10px;
    background-color: rgba(14, 165, 233, 0.02);
    border: 1px dashed var(--card-border);
    padding: 14px 18px;
    border-radius: var(--border-radius-md);
    margin-top: 20px;
}
.non-diagnostic-note .note-icon {
    color: var(--primary);
    min-width: 18px;
}
.non-diagnostic-note p {
    font-size: 12px;
    margin-bottom: 0;
    color: var(--text-secondary);
    line-height: 1.4;
}

.explainer-intro {
    background-color: rgba(14, 165, 233, 0.01);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin-bottom: 30px;
}
.explainer-intro h3 {
    color: var(--primary);
    font-size: 16px;
    margin-bottom: 6px;
    font-weight: 700;
}
.explainer-intro p {
    font-size: 13px;
    margin-bottom: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 📊 Premium Matrix Table Desktop & Tablet Styles */
.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
    margin-bottom: 20px;
    background: var(--input-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.matrix-table th {
    background-color: rgba(15, 23, 42, 0.04);
    color: var(--text-primary);
    font-weight: 700;
    padding: 16px 12px;
    text-align: center;
    border-bottom: 2px solid var(--card-border);
    font-size: 13px;
    letter-spacing: 0.02em;
    transition: var(--transition-smooth);
}

body.dark-theme .matrix-table th {
    background-color: rgba(255, 255, 255, 0.03);
}

.matrix-table th:first-child,
.matrix-table td:first-child {
    text-align: left;
    width: 35%;
    padding-left: 20px;
    font-weight: 600;
}

.matrix-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-secondary);
    text-align: center;
    vertical-align: middle;
    transition: var(--transition-smooth);
}

.matrix-table tbody tr:nth-child(even) {
    background-color: rgba(15, 23, 42, 0.015);
}

body.dark-theme .matrix-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.008);
}

.matrix-table tbody tr:hover {
    background-color: rgba(14, 165, 233, 0.04) !important;
}

/* Custom styled matrix radios */
.matrix-table td input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--card-border);
    border-radius: 50%;
    background-color: var(--bg-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition-smooth);
    margin: 0 auto 6px auto;
}

.matrix-table td input[type="radio"]:hover {
    border-color: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.25);
}

.matrix-table td input[type="radio"]:checked {
    border-color: var(--primary);
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.matrix-table td input[type="radio"]:checked::after {
    content: "";
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    display: block;
}

body.dark-theme .matrix-table td input[type="radio"]:checked::after {
    background-color: #0b0f19;
}

.matrix-table td:has(input[type="radio"]:checked) {
    background-color: rgba(14, 165, 233, 0.06);
    color: var(--primary);
}

/* Beautiful inline sublabel directly from data-label */
.matrix-table td:has(input[type="radio"])::after {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    line-height: 1.3;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
    text-align: center;
    opacity: 0.65;
    transition: var(--transition-smooth);
}

.matrix-table td:has(input[type="radio"]):hover::after {
    opacity: 1;
    color: var(--text-primary);
}

.matrix-table td:has(input[type="radio"]:checked)::after {
    color: var(--primary);
    font-weight: 700;
    opacity: 1;
}

/* Sticky headers for vertical scrolling clarity (excluding the short demographics table in step 2 to allow selection) */
@media (min-width: 769px) {
    .survey-step:not([data-step="2"]) .matrix-table th {
        position: sticky;
        top: 80px;
        background-color: #ffffff !important;
        z-index: 10;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    }
    body.dark-theme .survey-step:not([data-step="2"]) .matrix-table th {
        background-color: #141b2d !important;
    }
}

.matrix-table th:not(:first-child) {
    cursor: pointer;
}
.matrix-table th:not(:first-child):hover {
    background-color: rgba(14, 165, 233, 0.15) !important;
    color: var(--primary);
}
body.dark-theme .matrix-table th:not(:first-child):hover {
    background-color: rgba(14, 165, 233, 0.25) !important;
}

/* 🎓 Academic Footer Styles */
.academic-footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--card-border);
    background-color: rgba(255, 255, 255, 0.95);
    transition: background-color 0.4s ease;
}

body.dark-theme .academic-footer {
    background-color: rgba(11, 15, 25, 0.95);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-about {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-citations h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 800;
}

.citation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.citation-list li {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    border-left: 2px solid var(--card-border);
    padding-left: 12px;
}

.citation-list li a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.citation-list li a:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid var(--card-border);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    margin-bottom: 8px;
}

/* ✉️ Contact Section styling */
.contact-section {
    background-color: var(--bg-main);
}

.contact-section label {
    transition: color 0.3s ease;
}

.contact-section input:focus, 
.contact-section select:focus, 
.contact-section textarea:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.contact-section select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px !important;
}

body.dark-theme .contact-section select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* 🔒 Admin Login Modal CSS (Gated Authorization Panel) */
dialog#admin-login-modal {
    border: none;
    padding: 0;
    width: 90%;
    max-width: 460px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-hover);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    overflow: hidden;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

dialog#admin-login-modal::backdrop {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

dialog#admin-login-modal .modal-content {
    padding: 30px;
    background: transparent;
}

dialog#admin-login-modal input:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Close Modal Button hover styling */
.close-modal-btn:hover {
    color: var(--danger) !important;
    transform: scale(1.1);
    transition: var(--transition-smooth);
}

/* ♿ High Contrast Focus Ring for Keyboard Accessibility */
:focus-visible {
    outline: 3px solid var(--primary) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 2px var(--bg-main) !important;
}

/* Styles for MFA Configuration Badge */
#mfa-status-badge {
    transition: var(--transition-smooth);
}

#mfa-status-badge.active {
    background: rgba(16, 185, 129, 0.1) !important;
    color: var(--success) !important;
}

#mfa-status-badge.active span {
    background: var(--success) !important;
}

/* Google Ads Analytics Custom Styling */
.google-ads-kpi-card {
    border-left: 4px solid var(--primary);
}

#google-ads-campaign-table td {
    padding: 12px;
    vertical-align: middle;
}

/* 🔬 Research Intro & SLR Section Custom Styles */
.intro-tab-btn:hover {
    color: var(--primary) !important;
    background-color: rgba(2, 132, 199, 0.04);
}

.intro-tab-btn.active {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
    background-color: rgba(2, 132, 199, 0.08);
}

body.dark-theme .intro-tab-btn.active {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
    background-color: rgba(0, 242, 254, 0.08);
}

.intro-tab-panel {
    transition: opacity 0.35s ease, transform 0.35s ease;
    opacity: 0;
    transform: translateY(8px);
}

.intro-tab-panel.active {
    opacity: 1;
    transform: translateY(0);
}

/* SLR Carousel Cards animation */
.slr-finding-card {
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(12px);
}

.slr-finding-card.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments for the grid */
@media (max-width: 768px) {
    .research-intro-section .grid-2 {
        grid-template-columns: 1fr !important;
    }
}



