/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #0a1628;
    --navy-light: #132240;
    --navy-mid: #1a2d4a;
    --blue: #2563eb;
    --blue-light: #3b82f6;
    --red: #dc2626;
    --red-light: #ef4444;
    --amber: #f59e0b;
    --green: #10b981;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --nav-height: 64px;
    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --container-max-width: 1080px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: calc(var(--nav-height) + 12px);
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

p, li, td, th {
    overflow-wrap: break-word;
}

:focus-visible {
    outline: 3px solid var(--blue-light);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 12px;
    z-index: 1200;
    background: var(--white);
    color: var(--navy);
    border: 2px solid var(--blue);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-180%);
    transition: transform 0.2s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.noscript-warning {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: #fffbeb;
    color: #92400e;
    border-bottom: 1px solid #fde68a;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 16px;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== NAVIGATION ===== */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 22, 40, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: var(--nav-height);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.3s;
}

.nav-brand {
    background: none;
    border: none;
    padding: 8px 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    background: rgba(255,255,255,0.08);
}

.nav-brand:focus-visible,
.nav-toggle:focus-visible,
.nav-links a:focus-visible,
.cta-button:focus-visible,
.filter-btn:focus-visible,
.chapter-tab:focus-visible,
.actor-card:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 2px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 1px;
    transition: 0.3s;
}

/* ===== HERO ===== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, #1a1a3e 40%, #2d1b4e 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(220, 38, 38, 0.1) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 120px 24px 80px;
    max-width: 900px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--gray-400);
    max-width: 700px;
    margin: 0 auto 24px;
    line-height: 1.5;
}

.educational-use-notice {
    max-width: 860px;
    margin: 0 auto 44px;
    padding: 14px 20px;
    border-radius: 12px;
    border: 2px solid #f59e0b;
    background: #fdf6e8;
    color: #7c2d12;
    font-size: clamp(0.95rem, 2.1vw, 1.1rem);
    line-height: 1.45;
}

.educational-use-notice strong {
    font-weight: 800;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.hero-stat {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 24px 16px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.hero-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.cta-button {
    display: inline-block;
    background: var(--blue);
    color: var(--white);
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.cta-button:hover {
    background: var(--blue-light);
    transform: translateY(-1px);
}

.hero-deep-dives {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hero-deep-dive-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.hero-deep-dive-link:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
    text-decoration: none;
}

.hero-deep-dive-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-300);
}

.hero-deep-dive-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px 0;
}

section[id] {
    scroll-margin-top: calc(var(--nav-height) + 12px);
}

.section-dark {
    background: var(--gray-50);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    color: var(--gray-900);
}

.section-intro {
    text-align: center;
    color: var(--gray-500);
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto 48px;
}

/* ===== OVERVIEW GRID ===== */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.overview-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 32px 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.overview-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--navy);
    color: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.overview-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.overview-card p {
    font-size: 0.92rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ===== TIMELINE ===== */
.timeline-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    border: 1px solid var(--gray-300);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.filter-btn.active {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-300);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
    opacity: 1;
    transition: opacity 0.3s, transform 0.3s;
}

.timeline-item.hidden {
    display: none;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--gray-400);
    z-index: 1;
}

.timeline-item.highlight::before {
    border-color: var(--blue);
    background: var(--blue-light);
}

.timeline-item.critical::before {
    border-color: var(--red);
    background: var(--red-light);
    width: 14px;
    height: 14px;
    left: -34px;
    top: 5px;
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.timeline-content {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 20px 24px;
}

.timeline-item.critical .timeline-content {
    border-left: 3px solid var(--red);
}

.timeline-item.highlight .timeline-content {
    border-left: 3px solid var(--blue);
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.55;
    margin-bottom: 8px;
}

.timeline-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 4px;
}

.tag-buybacks { background: #dbeafe; color: #1e40af; }
.tag-governance { background: #fae8ff; color: #86198f; }
.tag-insider { background: #fee2e2; color: #991b1b; }
.tag-credit { background: #fef3c7; color: #92400e; }
.tag-collapse { background: #fecaca; color: #7f1d1d; }
.tag-litigation { background: #e0e7ff; color: #3730a3; }

/* ===== CHAPTERS ===== */
.chapter-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 32px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.chapter-tab {
    background: none;
    border: 1px solid var(--gray-300);
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    min-height: 48px;
    transition: all 0.2s;
}

.chapter-tab:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.chapter-tab.active {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.chapter-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.js-enabled .chapter-content {
    display: none;
}

.js-enabled .chapter-content.active {
    display: block;
}

.js-enabled .chapter-content[hidden] {
    display: none !important;
}

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

.chapter-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 8px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.chapter-header h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.chapter-verdict {
    display: flex;
    align-items: center;
    gap: 8px;
}

.verdict-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

.verdict-value {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.verdict-value.high { background: #dcfce7; color: #166534; }
.verdict-value.medium-high { background: #fef9c3; color: #854d0e; }
.verdict-value.medium { background: #fef3c7; color: #92400e; }

.chapter-body {
    max-width: 800px;
    margin: 0 auto;
}

.chapter-body h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 28px 0 12px;
}

.chapter-body p {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 12px;
}

.chapter-body ul {
    margin: 8px 0 16px 20px;
    color: var(--gray-600);
    line-height: 1.7;
}

.chapter-body li {
    margin-bottom: 6px;
}

/* Key Figure */
.key-figure {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
}

#bankruptcy .key-figure {
    max-width: 800px;
    margin: 0 auto 24px;
}

.figure-amount {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.figure-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-400);
}

/* Highlight Box */
.highlight-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 24px;
    margin: 20px 0;
}

.highlight-box h4 {
    color: #1e40af;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

.highlight-box p {
    color: var(--gray-700);
}

.highlight-box.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.highlight-box.warning h4 {
    color: #92400e;
}

.highlight-box.critical {
    background: #fef2f2;
    border-color: #fecaca;
}

.highlight-box.critical h4 {
    color: #991b1b;
}

/* Conflict Flow */
.conflict-flow {
    margin: 16px 0;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 4px;
}

.flow-number {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #1e40af;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.flow-text {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.flow-arrow {
    text-align: center;
    color: #1e40af;
    font-size: 1.2rem;
    margin: 4px 0 4px 5px;
}

/* Data Table */
.data-table-wrapper {
    overflow-x: auto;
    margin: 16px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: var(--navy);
    color: var(--white);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.data-table tr:hover td {
    background: var(--gray-50);
}

/* Comparison Cards */
.comparison-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.comparison-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 24px;
}

.comparison-card h4 {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

.comparison-stat {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.comparison-detail {
    font-size: 0.88rem;
    color: var(--gray-600);
    margin-bottom: 4px !important;
}

.comparison-detail.red { color: var(--red); font-weight: 600; }
.comparison-detail.amber { color: var(--amber); font-weight: 600; }

/* Cohen Timeline */
.cohen-timeline {
    margin: 24px 0;
    border-left: 3px solid var(--navy);
    padding-left: 24px;
}

.cohen-step {
    margin-bottom: 20px;
    position: relative;
}

.cohen-step::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--navy);
}

.cohen-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.cohen-event {
    font-size: 0.92rem;
    color: var(--gray-700);
    line-height: 1.5;
}

/* Dilution Visual */
.dilution-visual {
    margin: 24px 0;
}

.dilution-bar {
    display: flex;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray-300);
}

.dilution-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.dilution-segment.baseline {
    background: var(--navy);
    color: var(--white);
}

.dilution-segment.added {
    background: var(--red);
    color: var(--white);
}

.dilution-segment small {
    font-weight: 400;
    font-size: 0.7rem;
}

.dilution-label {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 8px;
    font-weight: 500;
}

/* SEC Findings */
.sec-findings {
    margin: 24px 0;
}

.sec-finding {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.sec-finding-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--amber);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.sec-finding-text h4 {
    font-size: 1rem;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
}

.sec-finding-text p {
    font-size: 0.9rem;
}

/* Failures Grid */
.failures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.failure-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 24px;
}

.failure-number {
    width: 28px;
    height: 28px;
    background: var(--red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.failure-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.failure-card p {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* ===== ACTORS ===== */
.actors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.actor-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 24px;
    cursor: default;
    transition: transform 0.2s, box-shadow 0.2s;
}

.js-enabled .actor-card {
    cursor: pointer;
}

.js-enabled .actor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.actor-tier {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    padding: 3px 10px;
    border-radius: 10px;
    display: inline-block;
}

.tier1 .actor-tier { background: #fee2e2; color: #991b1b; }
.tier2 .actor-tier { background: #fef3c7; color: #92400e; }
.tier3 .actor-tier { background: #e0e7ff; color: #3730a3; }

.actor-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.actor-role {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.actor-expand-hint {
    display: none;
}

.js-enabled .actor-expand-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--blue);
}

.js-enabled .actor-expand-hint::before {
    content: "+";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    line-height: 1;
}

.js-enabled .actor-card.expanded .actor-expand-hint {
    color: var(--gray-600);
}

.js-enabled .actor-card.expanded .actor-expand-hint::before {
    content: "−";
}

.actor-detail {
    border-top: 1px solid var(--gray-200);
    padding-top: 16px;
    margin-top: 12px;
}

.js-enabled .actor-detail {
    display: none;
}

.js-enabled .actor-card.expanded .actor-detail {
    display: block;
}

.actor-card.expanded {
    border-color: var(--blue);
    box-shadow: var(--shadow-md);
}

.actor-detail p {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* ===== MONEY FLOW ===== */
.money-flow {
    max-width: 800px;
    margin: 0 auto;
}

.money-source {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    border-radius: 12px;
    padding: 24px 32px;
    margin-bottom: 32px;
    text-align: center;
}

.money-source h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.money-source p {
    color: var(--gray-400);
    font-size: 0.9rem;
}

.money-channels {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.money-channel {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 20px 24px;
}

.money-channel.large {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #f8fbff 0%, var(--white) 100%);
}

.money-channel.large .channel-name,
.money-channel.large .channel-amount {
    font-weight: 800;
}

.channel-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--red);
    width: var(--bar-width);
    margin-bottom: 12px;
    transition: width 1s ease;
}

.channel-bar.unknown {
    background: repeating-linear-gradient(
        45deg,
        var(--gray-300),
        var(--gray-300) 5px,
        var(--gray-200) 5px,
        var(--gray-200) 10px
    );
}

.channel-info {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.channel-name {
    font-weight: 700;
    color: var(--gray-900);
    font-size: 0.95rem;
}

.channel-amount {
    font-weight: 700;
    color: var(--red);
    font-size: 0.95rem;
    font-family: var(--font-mono);
}

.channel-recipient {
    font-size: 0.82rem;
    color: var(--gray-500);
}

/* ===== LEGAL THEORIES ===== */
.legal-tiers {
    max-width: 900px;
    margin: 0 auto;
}

.legal-tier {
    margin-bottom: 48px;
}

.tier-header {
    font-size: 1.3rem;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tier-header.tier-1 { background: #dcfce7; color: #166534; }
.tier-header.tier-2 { background: #fef3c7; color: #92400e; }
.tier-header.tier-3 { background: #e0e7ff; color: #3730a3; }

.legal-cards {
    display: grid;
    gap: 16px;
}

.legal-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 24px;
}

.legal-rank {
    display: inline-block;
    background: var(--navy);
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.legal-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.legal-defendants {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.legal-card > p {
    font-size: 0.92rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 12px;
}

.legal-evidence {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.evidence-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.legal-gap {
    font-size: 0.85rem;
    color: var(--amber);
    font-weight: 500;
}

/* ===== WATERFALL ===== */
.waterfall-visual {
    max-width: 800px;
    margin: 24px auto;
}

#bankruptcy .highlight-box {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.waterfall-class {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    transition: transform 0.2s;
}

.waterfall-class:hover {
    transform: translateX(4px);
}

.waterfall-class.priority {
    border-left: 4px solid var(--red);
}

.waterfall-class.cramdown {
    border-left: 4px solid var(--amber);
}

.waterfall-class.wiped {
    border-left: 4px solid var(--gray-400);
    opacity: 0.7;
}

.waterfall-label {
    flex: 1;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--gray-900);
}

.waterfall-label small {
    display: block;
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--gray-500);
}

.waterfall-recovery {
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-mono);
    min-width: 100px;
    text-align: right;
}

.waterfall-recovery.paid { color: var(--green); }
.waterfall-recovery.zero { color: var(--red); }
.waterfall-recovery.partial { color: var(--amber); }

.waterfall-arrow {
    text-align: center;
    color: var(--gray-400);
    font-size: 1rem;
    margin: 2px 0;
}

/* ===== LITIGATION STATUS ===== */
.litigation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.litigation-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 28px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.litigation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.litigation-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.litigation-status.active { background: #dcfce7; color: #166534; }
.litigation-status.dismissed { background: #f1f5f9; color: #64748b; }

.litigation-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.litigation-court {
    font-size: 0.82rem;
    color: var(--gray-500);
    font-family: var(--font-mono);
    margin-bottom: 12px;
}

.litigation-card p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 8px;
}

.litigation-deadlines {
    margin-top: 16px;
    border-top: 1px solid var(--gray-200);
    padding-top: 12px;
}

.litigation-deadlines h5 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.deadline-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 4px 0;
    border-bottom: 1px solid var(--gray-100);
}

.deadline-date {
    font-weight: 600;
    color: var(--gray-900);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.deadline-event {
    color: var(--gray-600);
}

.deadline-item.imminent .deadline-date {
    color: var(--red);
}

/* ===== QUOTE BLOCK ===== */
.deposition-quote {
    border-left: 4px solid var(--navy-mid);
    padding: 16px 20px;
    margin: 16px 0;
    background: var(--gray-50);
    border-radius: 0 8px 8px 0;
}

.deposition-quote p {
    font-style: italic;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 4px;
}

.deposition-quote .quote-source {
    font-style: normal;
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 600;
}

/* ===== FOOTER ===== */
#footer {
    background: var(--navy);
    color: var(--gray-400);
    padding: 64px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.footer-col p,
.footer-col li {
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.section-cta-row {
    text-align: center;
    margin-top: 32px;
}

.deep-dive-cta {
    display: inline-block;
    padding: 12px 28px;
    background: var(--blue);
    color: var(--white);
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

.deep-dive-cta:hover {
    background: var(--blue-light);
    text-decoration: none;
}

.inline-detail-link {
    color: var(--blue-light);
    font-weight: 600;
}

.inline-detail-link:hover {
    color: #60a5fa;
}

.detail-link-row {
    margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    #main-nav {
        padding: 0 20px;
    }

    .container {
        padding: 0 20px;
    }

    .hero-content {
        padding: 112px 20px 72px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .hero-deep-dives {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .footer-content {
        gap: 28px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    #main-nav {
        padding: 0 16px;
    }

    .nav-brand {
        font-size: 1rem;
        max-width: calc(100vw - 88px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        max-height: calc(100vh - var(--nav-height));
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    #hero {
        min-height: auto;
    }

    .hero-content {
        padding: 104px 16px 56px;
    }

    .hero-deep-dives {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 32px;
    }

    .educational-use-notice {
        padding: 12px 14px;
        margin-bottom: 30px;
    }

    .hero-stat {
        padding: 16px 12px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .cta-button {
        width: 100%;
        max-width: 360px;
    }

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

    .section-intro {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .timeline-content p,
    .chapter-body p,
    .chapter-body li,
    .actor-detail p,
    .legal-card > p,
    .footer-col p,
    .footer-col li {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .chapter-body ul {
        margin-left: 18px;
    }

    .timeline {
        padding-left: 26px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item::before {
        left: -21px;
    }

    .timeline-item.critical::before {
        left: -22px;
    }

    .timeline-content {
        padding: 16px;
    }

    .chapter-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 24px;
    }

    .chapter-tab {
        padding: 10px 12px;
        font-size: 0.8rem;
        min-height: 46px;
    }

    .chapter-body {
        max-width: 100%;
    }

    .chapter-header h3 {
        font-size: 1.35rem;
    }

    .key-figure {
        padding: 22px 16px;
    }

    .figure-amount {
        font-size: 1.75rem;
    }

    .data-table {
        min-width: 620px;
    }

    .comparison-cards {
        grid-template-columns: 1fr;
    }

    .comparison-card {
        padding: 18px;
    }

    .comparison-stat {
        font-size: 1.7rem;
    }

    .dilution-bar {
        height: 72px;
    }

    .dilution-segment {
        font-size: 0.75rem;
        padding: 0 6px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

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

    .waterfall-class {
        padding: 12px 16px;
        gap: 12px;
    }

    .waterfall-label {
        font-size: 0.85rem;
    }

    .waterfall-recovery {
        font-size: 0.82rem;
        min-width: 80px;
    }

    .litigation-cards {
        grid-template-columns: 1fr;
    }

    .litigation-card {
        padding: 20px;
    }

    .deposition-quote {
        padding: 14px 16px;
        margin: 14px 0;
    }

    .deposition-quote p {
        font-size: 0.92rem;
    }

    .actor-card {
        padding: 18px;
    }

    .money-source {
        padding: 18px;
        margin-bottom: 24px;
    }

    .money-channel {
        padding: 16px;
    }

    .channel-info {
        gap: 8px;
    }

    .channel-name,
    .channel-amount {
        font-size: 0.9rem;
    }

    .tier-header {
        font-size: 1.05rem;
        padding: 10px 14px;
    }

    .legal-card {
        padding: 18px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    body.nav-open {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 14px;
    }

    #main-nav {
        padding: 0 12px;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content h1 {
        font-size: 1.9rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .educational-use-notice {
        font-size: 0.9rem;
    }

    .key-figure .figure-amount {
        font-size: 1.6rem;
    }

    .section {
        padding: 48px 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .timeline {
        padding-left: 22px;
    }

    .timeline-content p,
    .chapter-body p,
    .chapter-body li,
    .actor-detail p,
    .legal-card > p {
        font-size: 0.93rem;
        line-height: 1.68;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline-item::before {
        left: -18px;
    }

    .timeline-item.critical::before {
        left: -19px;
    }

    .filter-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }

    .chapter-tab {
        font-size: 0.77rem;
        padding: 9px 10px;
    }

    .money-channel {
        padding: 14px;
    }

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

    .waterfall-class {
        padding: 10px 14px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .waterfall-label {
        font-size: 0.82rem;
    }

    .waterfall-label small {
        font-size: 0.75rem;
    }

    .waterfall-recovery {
        font-size: 0.78rem;
        min-width: auto;
    }

    .litigation-card {
        padding: 16px;
    }

    .litigation-card h4 {
        font-size: 1.05rem;
    }

    .deadline-item {
        flex-direction: column;
        gap: 2px;
    }

    .deposition-quote {
        padding: 12px 14px;
    }

    .deposition-quote p {
        font-size: 0.88rem;
    }
}

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

    .nav-brand {
        max-width: calc(100vw - 76px);
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }
}
