/**
 * OZARK ORACLE - Egyptian Quantum Theme
 * Copyright (c) 2025-2026 Tammy L Casey. All rights reserved.
 *
 * MASTER STYLESHEET - SINGLE SOURCE OF TRUTH
 * Layer 1 of 3-tier CSS architecture
 *
 * PERMANENT DIRECTIVE (Feb 12, 2026):
 * - ZERO <style> tags in HTML files
 * - ZERO style="" attributes in HTML files
 * - ALL styling via CSS classes from .css files
 * - This file defines ONE style for every element type
 *
 * Load order: quantum-theme.css -> nav.css -> mobile.css -> stylesheet-*.css
 *
 * "Known by our fruits, not our roots"
 */

/* ========================================================================== */
/* CSS VARIABLES                                                              */
/* ========================================================================== */

:root {
    /* === Egyptian Color Palette === */
    --black: #000000;
    --black-light: #0a0a0a;
    --black-lighter: #111111;
    --black-panel: #141414;
    --black-card: #1a1a1a;

    --gold: #d4af37;
    --gold-light: #f0d16b;
    --gold-dark: #b8941f;
    --gold-dim: rgba(212, 175, 55, 0.6);
    --gold-glow: rgba(212, 175, 55, 0.3);
    --gold-subtle: rgba(212, 175, 55, 0.15);

    --silver: #D0D0D0;
    --silver-light: #E8E8E8;
    --silver-dark: #B0B0B0;
    --silver-darker: #999999;
    --silver-faint: #777777;
    --white: #FFFFFF;

    /* Glass morphism */
    --glass-bg: rgba(0, 0, 0, 0.75);
    --glass-bg-light: rgba(20, 20, 20, 0.85);
    --glass-border: rgba(212, 175, 55, 0.3);
    --glass-border-hover: rgba(212, 175, 55, 0.6);
    --glass-border-dim: rgba(192, 192, 192, 0.15);

    /* Status */
    --success: #90EE90;
    --warning: #FFD700;
    --error: #FF6B6B;
    --info: #87CEEB;

    /* Fonts */
    --font-heading: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: 'Courier New', Consolas, Monaco, monospace;
    --font-cuneiform: 'Noto Sans Cuneiform', serif;

    /* Sizes (compact — shrunk ~20% from defaults) */
    --text-2xs: 0.5rem;
    --text-xs: 0.625rem;
    --text-sm: 0.75rem;
    --text-base: 0.8125rem;
    --text-lg: 0.875rem;
    --text-xl: 1rem;
    --text-2xl: 1.25rem;
    --text-3xl: 1.625rem;
    --text-4xl: 2rem;
    --text-5xl: 2.75rem;

    /* Spacing (tighter) */
    --sp-xs: 0.125rem;
    --sp-sm: 0.25rem;
    --sp-md: 0.5rem;
    --sp-lg: 0.75rem;
    --sp-xl: 1rem;
    --sp-2xl: 1.5rem;
    --sp-3xl: 2rem;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 100px;
    --radius-circle: 50%;

    /* Transitions */
    --ease-fast: 0.15s ease;
    --ease-normal: 0.3s ease;
    --ease-slow: 0.5s ease;

    /* Z-layers */
    --z-base: 1;
    --z-content: 10;
    --z-sticky: 100;
    --z-overlay: 500;
    --z-modal: 1000;
    --z-nav: 9999;
    --z-top: 10000;
}


/* ========================================================================== */
/* RESET & BASE                                                               */
/* ========================================================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--black);
    color: var(--silver);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.4;
    overflow-x: hidden;
    min-height: 100vh;
}

::selection {
    background: var(--gold);
    color: var(--black);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--silver-light);
    text-decoration: none;
    transition: color var(--ease-fast);
}

a:hover {
    color: var(--gold);
}


/* ========================================================================== */
/* TYPOGRAPHY - ONE STYLE PER ELEMENT                                         */
/* ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--sp-sm);
}

h1 {
    font-size: var(--text-3xl);
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px var(--gold-glow);
    margin-bottom: var(--sp-lg);
}

h2 {
    font-size: var(--text-2xl);
    color: var(--silver-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-bottom: var(--sp-xs);
    border-bottom: 1px solid var(--glass-border);
    margin-top: var(--sp-xl);
    margin-bottom: var(--sp-md);
}

h3 {
    font-size: var(--text-xl);
    color: var(--silver);
    letter-spacing: 1px;
    margin-top: var(--sp-lg);
}

h4 {
    font-size: var(--text-lg);
    color: var(--silver-dark);
}

h5 {
    font-size: var(--text-base);
    color: var(--silver-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

h6 {
    font-size: var(--text-sm);
    color: var(--silver-darker);
    text-transform: uppercase;
    letter-spacing: 1px;
}

p {
    color: var(--silver);
    margin-bottom: var(--sp-sm);
    line-height: 1.7;
}

strong, b {
    color: var(--silver-light);
    font-weight: 600;
}

em, i {
    color: var(--silver);
}

small {
    font-size: var(--text-sm);
    color: var(--silver-dark);
}

blockquote {
    border-left: 3px solid var(--gold);
    padding: var(--sp-md) var(--sp-lg);
    margin: var(--sp-lg) 0;
    background: var(--glass-bg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--silver-light);
    font-style: italic;
}

code {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-light);
    padding: 0.1em 0.4em;
    border-radius: var(--radius-sm);
}

pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: var(--black-lighter);
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-md);
    padding: var(--sp-lg);
    overflow-x: auto;
    margin: var(--sp-lg) 0;
    color: var(--silver-light);
    line-height: 1.5;
}

pre code {
    background: none;
    padding: 0;
}

hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: var(--sp-xl) 0;
}

mark {
    background: var(--gold-subtle);
    color: var(--gold-light);
    padding: 0.1em 0.3em;
    border-radius: var(--radius-sm);
}


/* ========================================================================== */
/* LISTS                                                                      */
/* ========================================================================== */

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: var(--sp-md);
    color: var(--silver);
}

li {
    margin-bottom: var(--sp-xs);
    line-height: 1.6;
}

li::marker {
    color: var(--gold-dim);
}

.list-none {
    list-style: none;
    margin-left: 0;
}

.evidence-list {
    list-style: none;
    margin-left: 0;
}

.evidence-list li {
    padding: var(--sp-sm) 0;
    padding-left: var(--sp-lg);
    border-left: 3px solid var(--gold-dim);
    margin-bottom: var(--sp-md);
}


/* ========================================================================== */
/* PAGE LAYOUT                                                                */
/* ========================================================================== */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--sp-xl) var(--sp-lg);
    min-height: calc(100vh - 120px);
}

.page-container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--sp-xl) var(--sp-lg);
    min-height: calc(100vh - 120px);
}

.page-container-full {
    width: 100%;
    padding: var(--sp-lg);
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: var(--sp-2xl);
    padding-bottom: var(--sp-lg);
    border-bottom: 1px solid var(--glass-border);
}

.page-header p {
    color: var(--silver-dark);
    font-size: var(--text-lg);
    max-width: 800px;
    margin: 0 auto;
}

.section {
    margin-bottom: var(--sp-2xl);
}


/* ========================================================================== */
/* GLASS CONTAINERS                                                           */
/* ========================================================================== */

.glass-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-xl);
    margin: var(--sp-lg) 0;
    backdrop-filter: blur(10px);
}

.glass-container-sm {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-md);
    padding: var(--sp-md);
    margin: var(--sp-sm) 0;
    backdrop-filter: blur(5px);
}

.panel {
    background: var(--black-panel);
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-md);
    padding: var(--sp-lg);
    margin: var(--sp-md) 0;
}

.panel-gold {
    background: var(--black-panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--sp-lg);
    margin: var(--sp-md) 0;
}


/* ========================================================================== */
/* CARDS                                                                      */
/* ========================================================================== */

.card {
    background: var(--black-card);
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-lg);
    padding: var(--sp-lg);
    margin: var(--sp-md) 0;
    transition: border-color var(--ease-normal), box-shadow var(--ease-normal), transform var(--ease-normal);
}

.card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 0 20px var(--gold-glow);
    transform: translateY(-3px);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-link:hover {
    color: inherit;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--sp-sm);
    flex-wrap: wrap;
    gap: var(--sp-sm);
}

.card-title {
    font-size: var(--text-xl);
    color: var(--gold);
    margin-bottom: var(--sp-xs);
}

.card-subtitle {
    font-size: var(--text-sm);
    color: var(--silver-dark);
}

.card-body {
    color: var(--silver);
}

.card-footer {
    margin-top: var(--sp-md);
    padding-top: var(--sp-sm);
    border-top: 1px solid var(--glass-border-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-sm);
}

.card-meta {
    display: flex;
    gap: var(--sp-md);
    flex-wrap: wrap;
    font-size: var(--text-sm);
    color: var(--silver-dark);
}

/* Card image (book covers, movie posters) */
.card-img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
    background: #111;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}


/* ========================================================================== */
/* BUTTONS                                                                    */
/* ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm) var(--sp-lg);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--ease-normal);
    white-space: nowrap;
}

.btn:hover {
    background: var(--gold-subtle);
    border-color: var(--gold);
    color: var(--gold-light);
    box-shadow: 0 0 15px var(--gold-glow);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--gold-light);
    color: var(--black);
    box-shadow: 0 0 25px var(--gold-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--silver);
    border-color: var(--silver-faint);
}

.btn-secondary:hover {
    background: rgba(192, 192, 192, 0.1);
    border-color: var(--silver);
    color: var(--silver-light);
}

.btn-danger {
    background: transparent;
    color: var(--error);
    border-color: rgba(255, 107, 107, 0.4);
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: var(--error);
}

.btn-sm {
    padding: var(--sp-xs) var(--sp-md);
    font-size: var(--text-sm);
}

.btn-lg {
    padding: var(--sp-md) var(--sp-2xl);
    font-size: var(--text-lg);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: var(--sp-sm);
    flex-wrap: wrap;
}


/* ========================================================================== */
/* FORMS & INPUTS                                                             */
/* ========================================================================== */

.form-group {
    margin-bottom: var(--sp-lg);
}

label {
    display: block;
    color: var(--silver);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--sp-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: var(--sp-sm) var(--sp-md);
    background: var(--black-lighter);
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-md);
    color: var(--silver-light);
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

input::placeholder,
textarea::placeholder {
    color: var(--silver-faint);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.search-container {
    display: flex;
    gap: var(--sp-sm);
    margin: var(--sp-lg) 0;
}

.search-container input {
    flex: 1;
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.checkbox-label input,
.radio-label input {
    width: auto;
    accent-color: var(--gold);
}


/* ========================================================================== */
/* TABLES                                                                     */
/* ========================================================================== */

.table-container {
    overflow-x: auto;
    margin: var(--sp-lg) 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border-dim);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--black-lighter);
}

th {
    padding: var(--sp-sm) var(--sp-md);
    text-align: left;
    color: var(--gold);
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--glass-border);
}

td {
    padding: var(--sp-sm) var(--sp-md);
    color: var(--silver);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tr:hover td {
    background: rgba(212, 175, 55, 0.05);
}

.table-sm th,
.table-sm td {
    padding: var(--sp-xs) var(--sp-sm);
    font-size: var(--text-sm);
}


/* ========================================================================== */
/* GRIDS                                                                      */
/* ========================================================================== */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-lg);
    margin: var(--sp-lg) 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg);
    margin: var(--sp-lg) 0;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-lg);
    margin: var(--sp-lg) 0;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--sp-lg);
    margin: var(--sp-lg) 0;
}

.flex-row {
    display: flex;
    gap: var(--sp-md);
    flex-wrap: wrap;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-md);
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* ========================================================================== */
/* STATS                                                                      */
/* ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--sp-lg);
    margin: var(--sp-lg) 0;
}

.stat-box {
    background: var(--black-panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-lg);
    text-align: center;
    transition: all var(--ease-normal);
}

.stat-box:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
}

.stat-value {
    display: block;
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--gold);
    line-height: 1.2;
    margin-bottom: var(--sp-xs);
}

.stat-label {
    display: block;
    font-size: var(--text-sm);
    color: var(--silver-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ========================================================================== */
/* BADGES & TAGS                                                              */
/* ========================================================================== */

.badge {
    display: inline-block;
    padding: 0.15em 0.6em;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--glass-border);
    color: var(--gold);
    background: var(--gold-subtle);
}

.badge-success {
    color: var(--success);
    background: rgba(144, 238, 144, 0.15);
    border-color: rgba(144, 238, 144, 0.3);
}

.badge-warning {
    color: var(--warning);
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
}

.badge-danger {
    color: var(--error);
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
}

.badge-info {
    color: var(--info);
    background: rgba(135, 206, 235, 0.15);
    border-color: rgba(135, 206, 235, 0.3);
}

.tag {
    display: inline-block;
    padding: 0.2em 0.5em;
    font-size: var(--text-xs);
    border-radius: var(--radius-sm);
    background: var(--black-lighter);
    border: 1px solid var(--glass-border-dim);
    color: var(--silver);
    margin: 0.15em;
}


/* ========================================================================== */
/* ALERTS & MESSAGES                                                          */
/* ========================================================================== */

.alert {
    padding: var(--sp-md) var(--sp-lg);
    border-radius: var(--radius-md);
    margin: var(--sp-md) 0;
    border: 1px solid;
}

.alert-warning {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: var(--warning);
}

.alert-danger {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
    color: var(--error);
}

.alert-success {
    background: rgba(144, 238, 144, 0.1);
    border-color: rgba(144, 238, 144, 0.3);
    color: var(--success);
}

.alert-info {
    background: rgba(135, 206, 235, 0.1);
    border-color: rgba(135, 206, 235, 0.3);
    color: var(--info);
}

.disclaimer {
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.25);
    border-radius: var(--radius-md);
    padding: var(--sp-lg);
    margin: var(--sp-lg) 0;
    color: var(--silver);
}

.disclaimer h3 {
    color: var(--error);
    margin-bottom: var(--sp-sm);
}

.legal-disclaimer {
    font-size: var(--text-xs);
    color: var(--silver-darker);
    border: 1px solid var(--glass-border-dim);
    padding: 6px 10px;
    margin-bottom: var(--sp-sm);
    line-height: 1.4;
    background: rgba(10, 10, 10, 0.3);
}


/* ========================================================================== */
/* COLLAPSIBLE SECTIONS                                                       */
/* ========================================================================== */

.collapsible {
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-md);
    margin: var(--sp-sm) 0;
    overflow: hidden;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-md) var(--sp-lg);
    background: var(--black-lighter);
    cursor: pointer;
    transition: background var(--ease-fast);
    user-select: none;
}

.collapsible-header:hover {
    background: var(--black-card);
}

.collapsible-header h3 {
    margin: 0;
    font-size: var(--text-base);
    color: var(--gold);
}

.collapsible-toggle {
    color: var(--gold);
    font-size: var(--text-lg);
    font-weight: bold;
    width: 24px;
    text-align: center;
}

.collapsible-body {
    padding: var(--sp-lg);
    display: none;
}

.collapsible.open .collapsible-body {
    display: block;
}


/* ========================================================================== */
/* TABS                                                                       */
/* ========================================================================== */

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--glass-border-dim);
    margin-bottom: var(--sp-lg);
    overflow-x: auto;
}

.tab {
    padding: var(--sp-sm) var(--sp-lg);
    color: var(--silver-dark);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all var(--ease-fast);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab:hover {
    color: var(--silver-light);
}

.tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


/* ========================================================================== */
/* TIMELINE                                                                   */
/* ========================================================================== */

.timeline {
    position: relative;
    padding: var(--sp-lg) 0;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--sp-xl);
    padding-left: var(--sp-xl);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-circle);
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

.timeline-date {
    font-size: var(--text-sm);
    color: var(--gold-dim);
    margin-bottom: var(--sp-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-title {
    font-size: var(--text-lg);
    color: var(--silver-light);
    margin-bottom: var(--sp-xs);
}

.timeline-body {
    color: var(--silver-dark);
}


/* ========================================================================== */
/* SCORE INDICATORS                                                           */
/* ========================================================================== */

.score {
    display: inline-block;
    padding: var(--sp-xs) var(--sp-md);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: var(--text-lg);
}

.score-high {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.5);
    color: #FFB0B0;
}

.score-medium {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.5);
    color: #FFD070;
}

.score-low {
    background: rgba(144, 238, 144, 0.2);
    border: 1px solid rgba(144, 238, 144, 0.5);
    color: #B0FFB0;
}


/* ========================================================================== */
/* PROGRESS & LOADING                                                         */
/* ========================================================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.eye-of-horus {
    width: 120px;
    height: 120px;
    position: relative;
    animation: pulse-glow 2s ease-in-out infinite;
}

.eye-of-horus::before,
.eye-of-horus::after {
    content: '';
    position: absolute;
    border: 3px solid var(--gold);
}

.eye-of-horus::before {
    width: 80px;
    height: 40px;
    border-radius: 50%;
    border-bottom: none;
    top: 40px;
    left: 20px;
    animation: eye-blink 3s ease-in-out infinite;
}

.eye-of-horus::after {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-circle);
    top: 50px;
    left: 50px;
    background: var(--gold);
    box-shadow: 0 0 20px var(--gold);
    animation: pupil-dilate 2s ease-in-out infinite;
}

.loading-text {
    color: var(--gold);
    font-size: var(--text-lg);
    letter-spacing: 3px;
    margin-top: 30px;
    text-align: center;
    animation: fade-pulse 2s ease-in-out infinite;
}

.loading-subtext {
    color: var(--silver-dark);
    font-size: var(--text-sm);
    margin-top: 10px;
    text-align: center;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border-dim);
    border-top-color: var(--gold);
    border-radius: var(--radius-circle);
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--black-lighter);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin: var(--sp-sm) 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
    border-radius: var(--radius-pill);
    transition: width var(--ease-slow);
}


/* ========================================================================== */
/* MODALS                                                                     */
/* ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--sp-lg);
}

.modal-overlay.visible {
    display: flex;
}

.modal {
    background: var(--black-panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-2xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-lg);
    padding-bottom: var(--sp-md);
    border-bottom: 1px solid var(--glass-border-dim);
}

.modal-close {
    background: none;
    border: none;
    color: var(--silver-dark);
    font-size: var(--text-2xl);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gold);
}

body.no-scroll {
    overflow: hidden;
}


/* ========================================================================== */
/* TOOLTIP                                                                    */
/* ========================================================================== */

.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--black-card);
    border: 1px solid var(--glass-border);
    color: var(--silver-light);
    padding: var(--sp-xs) var(--sp-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ease-fast);
    z-index: var(--z-top);
}

.tooltip:hover::after {
    opacity: 1;
}


/* ========================================================================== */
/* BACK LINK                                                                  */
/* ========================================================================== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    color: var(--silver-dark);
    font-size: var(--text-sm);
    margin-bottom: var(--sp-lg);
    transition: color var(--ease-fast);
}

.back-link:hover {
    color: var(--gold);
}

.back-link::before {
    content: '\2190';
}


/* ========================================================================== */
/* RESULT COUNT / INFO BAR                                                    */
/* ========================================================================== */

.info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-sm) var(--sp-md);
    background: var(--black-lighter);
    border-radius: var(--radius-md);
    margin: var(--sp-md) 0;
    font-size: var(--text-sm);
    color: var(--silver-dark);
    flex-wrap: wrap;
    gap: var(--sp-sm);
}

.result-count {
    color: var(--gold);
    font-weight: 600;
}


/* ========================================================================== */
/* EMPTY STATE                                                                */
/* ========================================================================== */

.empty-state {
    text-align: center;
    padding: var(--sp-3xl) var(--sp-lg);
    color: var(--silver-faint);
}

.empty-state h3 {
    color: var(--silver-dark);
    margin-bottom: var(--sp-sm);
}


/* ========================================================================== */
/* VISUALIZATION CONTAINERS                                                   */
/* ========================================================================== */

.viz-container {
    background: var(--black-light);
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-lg);
    padding: var(--sp-lg);
    margin: var(--sp-lg) 0;
    min-height: 400px;
    position: relative;
}

.viz-controls {
    display: flex;
    gap: var(--sp-sm);
    flex-wrap: wrap;
    margin-bottom: var(--sp-md);
    padding: var(--sp-sm);
    background: var(--black-lighter);
    border-radius: var(--radius-md);
}

.chart-container {
    position: relative;
    height: 400px;
    margin: var(--sp-lg) 0;
}

.network-graph {
    width: 100%;
    height: 600px;
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-md);
}


/* ========================================================================== */
/* FILTER BAR                                                                 */
/* ========================================================================== */

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-md);
    margin: var(--sp-md) 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-chips {
    display: flex;
    gap: var(--sp-xs);
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    padding: var(--sp-xs) var(--sp-md);
    border-radius: var(--radius-pill);
    border: 1px solid var(--glass-border-dim);
    background: transparent;
    color: var(--silver);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--ease-fast);
}

.chip:hover,
.chip.active {
    background: var(--gold-subtle);
    border-color: var(--gold);
    color: var(--gold);
}


/* ========================================================================== */
/* MULTI-STEP FORMS                                                           */
/* ========================================================================== */

.steps {
    display: flex;
    justify-content: center;
    gap: var(--sp-lg);
    margin: var(--sp-xl) 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-xs);
    color: var(--silver-faint);
    font-size: var(--text-sm);
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-circle);
    border: 2px solid var(--silver-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all var(--ease-normal);
}

.step.active .step-number {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--black);
}

.step.active {
    color: var(--gold);
}

.step.completed .step-number {
    border-color: var(--success);
    background: var(--success);
    color: var(--black);
}

.step-form {
    display: none;
}

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


/* ========================================================================== */
/* CATEGORY CARDS (Directory, etc.)                                           */
/* ========================================================================== */

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--sp-md);
    margin: var(--sp-lg) 0;
}

.cat-card {
    background: var(--black-lighter);
    border: 1px solid var(--glass-border-dim);
    border-left: 3px solid var(--silver-faint);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--ease-normal);
    overflow: hidden;
}

.cat-card[data-layer="CORE_POWER"] { border-left-color: #FFD700; }
.cat-card[data-layer="POLITICAL"] { border-left-color: #FF4444; }
.cat-card[data-layer="INTELLIGENCE"] { border-left-color: #00FFFF; }
.cat-card[data-layer="SOCIETY"] { border-left-color: #FF00FF; }
.cat-card[data-layer="ESOTERIC"] { border-left-color: #9900FF; }
.cat-card[data-layer="PERSONS"] { border-left-color: #FFFFFF; }
.cat-card[data-layer="OTHER"] { border-left-color: #888888; }

.cat-card:hover {
    border-color: var(--silver-faint);
    background: var(--black-panel);
}

.cat-card.active {
    background: var(--black-light);
}

/* Category card header (clickable) */
.cat-head {
    padding: var(--sp-lg) var(--sp-lg);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
}

.cat-title {
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--silver-light);
}

.cat-icon {
    font-size: var(--text-xl);
    margin-right: var(--sp-sm);
}

.cat-desc {
    color: var(--silver-darker);
    font-size: var(--text-xs);
    margin-top: var(--sp-xs);
}

.cat-count {
    font-size: var(--text-sm);
    color: var(--silver-faint);
    white-space: nowrap;
    padding-left: var(--sp-lg);
    text-align: right;
}

.cat-count strong {
    font-size: var(--text-xl);
    color: var(--silver-light);
    display: block;
}

/* Preview tags row */
.cat-preview {
    padding: 0 var(--sp-lg) var(--sp-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-xs);
}

.preview-tag {
    font-size: var(--text-xs);
    padding: 2px var(--sp-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border-dim);
    color: var(--silver-dark);
    border-radius: var(--radius-sm);
}

/* Expand/collapse label */
.cat-expand {
    text-align: center;
    padding: var(--sp-sm);
    color: var(--silver-faint);
    font-size: var(--text-xs);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    letter-spacing: 1px;
    cursor: pointer;
}

.cat-expand:hover {
    color: #FFD700;
}

.cat-preview {
    cursor: pointer;
}

/* Expanded category body */
.cat-body {
    display: none;
    border-top: 1px solid var(--glass-border-dim);
    max-height: 70vh;
    overflow-y: auto;
}

.cat-card.active .cat-body {
    display: block;
}

/* Entry list rows */
.entry-list {
    padding: 0;
}

.entry-row {
    padding: var(--sp-md) var(--sp-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--ease-fast);
    cursor: pointer;
}

.entry-row:hover {
    background: var(--black-card);
}

.entry-row.stub {
    opacity: 0.6;
}

.entry-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--silver);
}

.entry-name a {
    color: var(--silver);
    text-decoration: none;
}

.entry-row:hover .entry-name a {
    color: var(--gold);
}

.entry-sub {
    font-size: var(--text-xs);
    color: var(--silver-faint);
    margin-top: 2px;
}

.entry-actions {
    display: flex;
    gap: var(--sp-sm);
    align-items: center;
}

.link-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-circle);
    display: inline-block;
}

.link-dot[data-layer="CORE_POWER"] { background: #FFD700; }
.link-dot[data-layer="POLITICAL"] { background: #FF4444; }
.link-dot[data-layer="INTELLIGENCE"] { background: #00FFFF; }
.link-dot[data-layer="SOCIETY"] { background: #FF00FF; }
.link-dot[data-layer="ESOTERIC"] { background: #9900FF; }
.link-dot[data-layer="PERSONS"] { background: #FFFFFF; }
.link-dot[data-layer="OTHER"] { background: #888888; }

.stub-badge {
    font-size: 0.6em;
    background: var(--silver-faint);
    color: var(--silver-dark);
    padding: 1px 4px;
    margin-left: var(--sp-xs);
    vertical-align: middle;
    border-radius: var(--radius-sm);
}

/* === INFLUENCE SCORE BADGE === */

.influence-badge {
    font-size: 0.65em;
    font-weight: 700;
    padding: 1px 5px;
    margin-left: 6px;
    vertical-align: middle;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
}

.influence-badge.score-low {
    background: rgba(192, 192, 192, 0.15);
    color: var(--silver-dark);
    border: 1px solid rgba(192, 192, 192, 0.2);
}

.influence-badge.score-mid {
    background: rgba(255, 215, 0, 0.12);
    color: var(--gold);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.influence-badge.score-high {
    background: rgba(255, 70, 70, 0.15);
    color: #FF6666;
    border: 1px solid rgba(255, 70, 70, 0.4);
}

/* Collapse link at bottom of card body */
.cat-back {
    padding: var(--sp-md);
    text-align: center;
    background: var(--black-light);
}

.cat-back a {
    color: var(--silver-faint);
    font-size: var(--text-xs);
    text-decoration: none;
    letter-spacing: 1px;
}

.cat-back a:hover {
    color: var(--gold);
}

/* Simple card count/label (for filter-style use) */
.cat-card-count {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gold);
    display: block;
}

.cat-card-label {
    font-size: var(--text-sm);
    color: var(--silver-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================================================== */
/* NEXUS MODAL (Target detail overlay)                                        */
/* ========================================================================== */

.nexus-modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.nexus-modal.visible {
    display: block;
}

.nexus-modal-content {
    background: var(--black-lighter);
    margin: 5% auto;
    padding: var(--sp-2xl);
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-lg);
    width: 70%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 30px var(--gold-glow);
}

.nexus-close {
    color: var(--silver-faint);
    position: absolute;
    top: var(--sp-md);
    right: var(--sp-lg);
    font-size: var(--text-2xl);
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.nexus-close:hover {
    color: var(--white);
}

.nexus-header {
    border-bottom: 1px solid var(--glass-border-dim);
    padding-bottom: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.nexus-name {
    color: var(--gold);
    font-size: var(--text-2xl);
    margin-bottom: var(--sp-xs);
}

.nexus-cat-badge {
    display: inline-block;
    padding: 3px var(--sp-sm);
    background: var(--black-card);
    color: var(--silver-dark);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
}

.nexus-section {
    margin-bottom: var(--sp-xl);
}

.nexus-section h3 {
    color: var(--silver-faint);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--sp-md);
    border-left: 3px solid var(--gold);
    padding-left: var(--sp-sm);
}

.nexus-context-box {
    background: var(--black-light);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: var(--sp-md);
    color: var(--silver-dark);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    border-radius: var(--radius-md);
}

.nexus-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--sp-sm);
}

.nexus-link-item {
    background: var(--black-card);
    padding: var(--sp-sm) var(--sp-md);
    font-size: var(--text-sm);
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-sm);
    transition: all var(--ease-fast);
    color: var(--silver);
}

.nexus-link-item:hover {
    border-color: var(--gold);
    background: var(--black-panel);
}

.nexus-link-item a {
    color: var(--silver);
    text-decoration: none;
}

.nexus-footer {
    margin-top: var(--sp-2xl);
    text-align: right;
}

/* Bio Intel Badges (fraternity, secret society, education) */
.nexus-bio-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bio-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-family: var(--font-mono, monospace);
    border: 1px solid;
}

.bio-badge--fraternity {
    background: rgba(255, 105, 180, 0.15);
    border-color: #FF69B4;
    color: #FF69B4;
}

.bio-badge--society {
    background: rgba(153, 0, 255, 0.15);
    border-color: #9900FF;
    color: #bb66ff;
}

.bio-badge--education {
    background: rgba(0, 255, 255, 0.15);
    border-color: #00CCCC;
    color: #00CCCC;
}

.bio-badge--occult {
    background: rgba(255, 0, 0, 0.15);
    border-color: #FF4444;
    color: #FF4444;
}

.bio-badge--club {
    background: rgba(255, 215, 0, 0.15);
    border-color: #FFD700;
    color: #FFD700;
}

.bio-badge-label {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.65rem;
    opacity: 0.7;
}

/* Dynasty / Bloodlines Section */
.nexus-dynasty-maplink {
    float: right;
    font-size: var(--text-xs);
    color: var(--gold);
    text-decoration: none;
    opacity: 0.7;
    font-weight: normal;
}
.nexus-dynasty-maplink:hover { opacity: 1; text-decoration: underline; }

.dynasty-info-badge {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid;
    border-radius: 3px;
    font-weight: bold;
    font-size: var(--text-sm);
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.dynasty-member-count {
    display: block;
    font-size: var(--text-xs);
    font-weight: normal;
    opacity: 0.6;
    letter-spacing: 0;
}
.dynasty-family-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}
.dynasty-link-pill {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid;
    border-radius: 10px;
    font-size: var(--text-xs);
    color: var(--silver-light);
    cursor: pointer;
}
.dynasty-link-pill:hover { background: rgba(255,255,255,0.05); }
.dynasty-link-type {
    font-size: var(--text-2xs);
    opacity: 0.6;
    margin-left: 4px;
}
.dynasty-bridges { margin-top: 6px; }
.dynasty-bridge-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--silver-dark);
    margin-bottom: 4px;
}
.dynasty-bridge-pill {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid;
    border-radius: 10px;
    font-size: var(--text-xs);
    color: var(--silver-light);
    margin: 2px;
}
.dynasty-link-more {
    font-size: var(--text-xs);
    color: var(--silver-darker);
    margin-left: 4px;
}

/* Dynasty section in dossier page */
.dynasty-section {
    border-color: rgba(180, 100, 255, 0.3);
    background: rgba(45, 25, 64, 0.4);
}
.dynasty-section h2 {
    background: rgba(180, 100, 255, 0.08);
    color: #B464FF;
}
.dynasty-section .dynasty-map-btn {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #B464FF;
    color: #B464FF;
    text-decoration: none;
    font-size: var(--text-sm);
    margin-top: 8px;
}
.dynasty-section .dynasty-map-btn:hover {
    background: rgba(180, 100, 255, 0.15);
}

/* Connection Status Badge */
.nexus-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-family: var(--font-mono, monospace);
    margin-left: 8px;
}

.nexus-status-badge.status-active {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #FF4444;
    color: #FF4444;
}

.nexus-status-badge.status-connected {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #FFD700;
    color: #FFD700;
}

.nexus-status-badge.status-background {
    background: rgba(136, 136, 136, 0.2);
    border: 1px solid #888;
    color: #888;
}

/* Categorized Connections List */
.nexus-connections-list {
    max-height: 400px;
    overflow-y: auto;
}

.conn-type-group {
    margin-bottom: 12px;
}

.conn-type-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(192, 192, 192, 0.2);
    margin-bottom: 6px;
    cursor: pointer;
}

.conn-type-header:hover {
    border-bottom-color: #FFD700;
}

.conn-type-icon {
    font-size: 0.85rem;
}

.conn-type-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--silver, #C0C0C0);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.conn-type-count {
    font-size: 0.7rem;
    color: #888;
    margin-left: auto;
}

.conn-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0 3px 16px;
    font-size: 0.8rem;
    color: var(--silver-light, #E8E8E8);
    cursor: pointer;
}

.conn-entry:hover {
    color: #FFD700;
}

.conn-entry-type {
    font-size: 0.65rem;
    color: #888;
    font-style: italic;
}

.conn-entry-strength {
    margin-left: auto;
    font-size: 0.65rem;
    color: #666;
}


/* ========================================================================== */
/* PERSON / TARGET CARDS                                                      */
/* ========================================================================== */

.person-card {
    background: var(--black-card);
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-md);
    padding: var(--sp-md);
    display: flex;
    gap: var(--sp-md);
    align-items: flex-start;
    transition: all var(--ease-normal);
}

.person-card:hover {
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
}

.person-name {
    font-size: var(--text-lg);
    color: var(--gold);
    font-weight: 600;
}

.person-role {
    font-size: var(--text-sm);
    color: var(--silver-dark);
}

.person-meta {
    font-size: var(--text-xs);
    color: var(--silver-faint);
    margin-top: var(--sp-xs);
}


/* ========================================================================== */
/* DOSSIER SECTIONS                                                           */
/* ========================================================================== */

.dossier-header {
    text-align: center;
    margin-bottom: var(--sp-2xl);
    padding-bottom: var(--sp-lg);
    border-bottom: 2px solid var(--glass-border);
}

.dossier-name {
    font-size: var(--text-4xl);
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 30px var(--gold-glow);
    margin-bottom: var(--sp-sm);
}

.dossier-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-sm);
    font-size: var(--text-sm);
    color: var(--silver-dark);
}

.dossier-field {
    display: flex;
    gap: var(--sp-sm);
    padding: var(--sp-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.dossier-field-label {
    color: var(--gold-dim);
    font-weight: 600;
    min-width: 120px;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dossier-field-value {
    color: var(--silver-light);
}


/* ========================================================================== */
/* ANIMATIONS                                                                 */
/* ========================================================================== */

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 10px var(--gold)); }
    50% { filter: drop-shadow(0 0 30px var(--gold)); }
}

@keyframes eye-blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

@keyframes pupil-dilate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

@keyframes fade-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes gold-glow {
    0%, 100% { box-shadow: 0 0 15px var(--gold-glow); }
    50% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.5); }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


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

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

.text-gold { color: var(--gold); }
.text-silver { color: var(--silver); }
.text-white { color: var(--white); }
.text-muted { color: var(--silver-dark); }
.text-faint { color: var(--silver-faint); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--error); }

.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-uppercase { text-transform: uppercase; letter-spacing: 1px; }
.text-mono { font-family: var(--font-mono); }
.cuneiform-glyph { font-family: var(--font-cuneiform); }
.cuneiform-glyph-lg { font-family: var(--font-cuneiform); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--sp-sm); }
.mt-2 { margin-top: var(--sp-lg); }
.mt-3 { margin-top: var(--sp-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--sp-sm); }
.mb-2 { margin-bottom: var(--sp-lg); }
.mb-3 { margin-bottom: var(--sp-2xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--sp-sm); }
.p-2 { padding: var(--sp-lg); }
.p-3 { padding: var(--sp-2xl); }

.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }

.hidden { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gold-glow {
    text-shadow: 0 0 15px var(--gold-glow);
}

.highlight {
    color: var(--gold);
    font-weight: 600;
}

.divider {
    border: none;
    border-top: 1px solid var(--glass-border-dim);
    margin: var(--sp-lg) 0;
}

.no-connections {
    color: var(--silver-faint);
}

/* Scroll anchor offset for fixed nav */
[id] {
    scroll-margin-top: 70px;
}


/* ========================================================================== */
/* TIMELINE SLIDESHOW                                                         */
/* ========================================================================== */

.timeline-section {
    margin: var(--sp-2xl) 0;
    position: relative;
}

.timeline-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-md);
    gap: var(--sp-md);
    flex-wrap: wrap;
}

.slideshow-controls {
    display: flex;
    gap: var(--sp-sm);
    align-items: center;
}

.slideshow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-circle);
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    font-size: var(--text-lg);
    transition: all var(--ease-fast);
}

.slideshow-btn:hover {
    background: var(--gold-subtle);
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

.slideshow-btn.active {
    background: var(--gold);
    color: var(--black);
}

.timeline-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-circle);
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.8);
    color: var(--gold);
    cursor: pointer;
    font-size: var(--text-xl);
    transition: all var(--ease-fast);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--z-content);
}

.timeline-nav-btn:hover {
    background: var(--gold-subtle);
    border-color: var(--gold);
}

.timeline-nav-btn.nav-left {
    left: -20px;
}

.timeline-nav-btn.nav-right {
    right: -20px;
}

.timeline-h {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dim) var(--black-lighter);
    position: relative;
    padding: var(--sp-sm) 0 var(--sp-lg) 0;
}

.timeline-h::-webkit-scrollbar {
    height: 6px;
}

.timeline-h::-webkit-scrollbar-track {
    background: var(--black-lighter);
    border-radius: 3px;
}

.timeline-h::-webkit-scrollbar-thumb {
    background: var(--gold-dim);
    border-radius: 3px;
}

.timeline-h-track {
    display: flex;
    gap: var(--sp-md);
    padding: var(--sp-xs);
    width: max-content;
}

.timeline-h-year-marker {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: var(--sp-sm);
    scroll-snap-align: start;
}

.timeline-h-year-marker span {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold-glow);
    letter-spacing: 2px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.timeline-h-item {
    flex-shrink: 0;
    width: 180px;
    background: var(--black-card);
    border: 1px solid var(--glass-border-dim);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--ease-normal);
    scroll-snap-align: start;
    overflow: hidden;
}

.timeline-h-item:hover {
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
    transform: translateY(-4px);
}

.timeline-h-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: var(--black-lighter);
}

.timeline-h-img-placeholder {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black-lighter);
    color: var(--silver-faint);
    font-size: var(--text-xs);
    text-align: center;
    padding: var(--sp-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-h-info {
    padding: var(--sp-sm);
}

.timeline-h-title {
    font-size: var(--text-xs);
    color: var(--silver-light);
    line-height: 1.3;
    margin-bottom: var(--sp-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.timeline-h-year {
    font-size: var(--text-2xs);
    color: var(--gold-dim);
}

.timeline-h-medium {
    font-size: var(--text-2xs);
    color: var(--silver-faint);
    text-transform: uppercase;
}

/* Detail modal (wider than standard modal for rich content) */
.detail-modal {
    max-width: 800px;
}

.detail-modal-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    background: var(--black-lighter);
    border-radius: var(--radius-md);
    margin-bottom: var(--sp-lg);
}

.detail-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-lg);
}

.detail-modal-section {
    margin-bottom: var(--sp-lg);
    padding-bottom: var(--sp-md);
    border-bottom: 1px solid var(--glass-border-dim);
}

.detail-modal-section:last-child {
    border-bottom: none;
}

.detail-modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    margin-top: var(--sp-lg);
}

.detail-modal-links .btn {
    font-size: var(--text-sm);
}

/* Card clickable state for gallery */
.card-clickable {
    cursor: pointer;
    transition: all var(--ease-normal);
}

.card-clickable:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
    transform: translateY(-2px);
}


/* ========================================================================== */
/* RESPONSIVE DESIGN                                                          */
/* ========================================================================== */

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: var(--text-2xl);
        letter-spacing: 2px;
    }

    h2 {
        font-size: var(--text-xl);
    }

    .page-container,
    .page-container-wide {
        padding: var(--sp-lg) var(--sp-md);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

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

    .stat-value {
        font-size: var(--text-3xl);
    }

    .search-container {
        flex-direction: column;
    }

    .flex-between {
        flex-direction: column;
        align-items: flex-start;
    }

    .steps {
        gap: var(--sp-sm);
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: var(--text-sm);
    }

    .dossier-name {
        font-size: var(--text-2xl);
        letter-spacing: 2px;
    }

    .dossier-field {
        flex-direction: column;
    }

    .modal {
        margin: var(--sp-md);
        padding: var(--sp-lg);
    }

    .person-card {
        flex-direction: column;
    }

    .cat-grid {
        grid-template-columns: 1fr;
    }

    .nexus-modal-content {
        width: 95%;
        margin: 3% auto;
        padding: var(--sp-lg);
    }

    .nexus-name {
        font-size: var(--text-xl);
    }

    .nexus-links-grid {
        grid-template-columns: 1fr;
    }

    .timeline-nav-btn {
        display: none;
    }

    .timeline-h-item {
        width: 150px;
    }

    .timeline-h-img,
    .timeline-h-img-placeholder {
        height: 180px;
    }

    .detail-modal {
        max-width: 100%;
        margin: var(--sp-sm);
        padding: var(--sp-md);
    }

    .detail-modal-img {
        max-height: 250px;
    }

    table {
        font-size: var(--text-sm);
    }

    th, td {
        padding: var(--sp-xs) var(--sp-sm);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .cat-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-block-mobile {
        width: 100%;
    }
}


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

@media print {
    body {
        background: white;
        color: black;
    }

    h1, h2, h3 {
        color: black;
        text-shadow: none;
    }

    .card, .glass-container, .panel {
        border: 1px solid #ccc;
        background: white;
        box-shadow: none;
    }

    .btn, .back-link, .tabs, .viz-controls {
        display: none;
    }
}
