/* ============================================
   Molt Observatory - Launch Report Styles
   ============================================ */

/* Report Layout */
.report-layout {
    padding-top: 80px;
}

.report-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Report Hero */
.report-hero {
    padding: var(--space-4xl) 0 var(--space-3xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.report-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(255, 107, 107, 0.1) 0%, rgba(78, 205, 196, 0.05) 50%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.report-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.report-date {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.report-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent-secondary);
}

.report-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: var(--space-lg);
    position: relative;
}

.report-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.7;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    max-width: 700px;
    margin: 0 auto;
}

.report-stat {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.report-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-secondary);
    font-family: var(--font-mono);
}

.report-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Report Sections */
.report-section {
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--border-color);
}

.report-section:first-of-type {
    border-top: none;
}

.section-number {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
}

.report-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.report-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.report-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.report-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.report-section p+p {
    margin-top: calc(-1 * var(--space-sm));
}

/* Bullet points with proper padding */
.report-section ul,
.report-section ol {
    margin-left: var(--space-xl);
    padding-left: var(--space-md);
    margin-bottom: var(--space-lg);
}

.report-section li {
    margin-bottom: var(--space-sm);
    padding-left: var(--space-sm);
    color: var(--text-secondary);
    line-height: 1.8;
}

.report-section li strong {
    color: var(--text-primary);
}

/* Hyperlinks - bright and visible */
.report-section a,
.report-layout a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.report-section a:hover,
.report-layout a:hover {
    color: #7ae5de;
    text-decoration: underline;
}

/* Buttons should have white text, not link color */
.report-layout a.btn,
.report-section a.btn {
    color: white;
}

.report-layout a.btn:hover,
.report-section a.btn:hover {
    color: white;
    text-decoration: none;
}

/* Ensure text visibility on dark backgrounds */
.report-section code,
code.code-inline {
    background: rgba(78, 205, 196, 0.15);
    color: var(--accent-secondary);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.85em;
}

/* Chart Containers */
.chart-container {
    margin: var(--space-lg) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

/* Hide chart headers since graphs have their own titles */
.chart-header {
    display: none;
}

.chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-source {
    display: none;
}

.chart-container iframe {
    width: 100%;
    border: none;
    display: block;
}

/* ============================================
   DESKTOP (>1200px) - Horizontally spread, compact height
   ============================================ */
.chart-frame {
    height: 380px;
}

.chart-frame-tall {
    height: 490px;
}

.chart-frame-xl {
    height: 550px;
}

/* Threat vector charts */

/* TRENDS charts - with room for legend below, no excess space */
.chart-frame--threat-trends {
    height: 800px;
    width: 100%;
    border: none;
}

.chart-frame--threat-trends-wrapper {
    width: 100%;
    overflow: hidden;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
}

/* DETAILS charts: 4 Plotly subplots, stacks vertically on mobile/iPad */
.chart-frame--threat-details {
    height: 900px;
    width: 100%;
    border: none;
}

.chart-frame--threat-details-wrapper {
    width: 100%;
    overflow: hidden;
    background: transparent;
    border-radius: var(--radius);
}

/* Tablet (1024px and below) - Plotly subplots stack vertically via JS */
@media (max-width: 1024px) {
    .chart-frame--threat-trends {
        height: 520px;
    }

    /* Details: 4 stacked subplots need full height with spacing */
    .chart-frame--threat-details {
        height: 1600px;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .chart-frame--threat-trends {
        height: 680px;
    }

    .chart-frame--threat-details {
        height: 1400px;
    }

    .chart-frame--threat-trends-wrapper,
    .chart-frame--threat-details-wrapper {
        margin: 0 calc(-1 * var(--space-md));
        border-radius: 0;
    }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
    .chart-frame--threat-trends {
        height: 880px;
    }

    .chart-frame--threat-details {
        height: 1780px;
    }

    .chart-frame--threat-trends-wrapper,
    .chart-frame--threat-details-wrapper {
        margin: 0 calc(-1 * var(--space-sm));
    }
}

.chart-frame-short {
    height: 350px;
}

.chart-frame--pie {
    height: 400px;
}

/* Growth timeline charts - 4 charts stacked */
.chart-frame--growth {
    height: 1850px;
    min-height: 1850px;
}

/* Chart Grid - 2 columns on desktop */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

/* Wide container on desktop */
@media (min-width: 1200px) {
    .report-container {
        max-width: 1300px;
    }

    .chart-container {
        margin: var(--space-md) 0;
    }

    .chart-frame {
        height: 360px;
    }

    .chart-frame-tall {
        height: 420px;
    }

    .chart-frame-xl {
        height: 500px;
    }

    .chart-frame-short {
        height: 320px;
    }

    .chart-frame--pie {
        height: 380px;
    }

    .chart-frame--growth {
        height: 1750px;
        min-height: 1750px;
    }

    .chart-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
}

/* ============================================
   TABLET / iPad (768px - 1200px) - Medium sizing
   ============================================ */
@media (max-width: 1200px) and (min-width: 769px) {
    .report-container {
        max-width: 960px;
    }

    .chart-frame {
        height: 420px;
    }

    .chart-frame-tall {
        height: 480px;
    }

    .chart-frame-xl {
        height: 580px;
    }

    .chart-frame-short {
        height: 380px;
    }

    .chart-frame--pie {
        height: 420px;
    }

    .chart-frame--growth {
        height: 1900px;
        min-height: 1900px;
    }

    .chart-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
}

/* ============================================
   MOBILE (<768px) - Full width, taller charts
   ============================================ */
@media (max-width: 768px) {
    .chart-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
}

/* Insight Boxes */
.insight-box {
    padding: var(--space-xl);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(78, 205, 196, 0.05));
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: var(--space-xl) 0;
}

.insight-box.teal {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.08), rgba(167, 139, 250, 0.05));
    border-left-color: var(--accent-secondary);
}

.insight-box.warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(255, 107, 107, 0.05));
    border-left-color: var(--power-color);
}

.insight-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.insight-box p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* Stats Table */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
    font-size: 0.95rem;
}

.stats-table th,
.stats-table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.stats-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.stats-table td {
    color: var(--text-secondary);
}

.stats-table tr:hover td {
    background: var(--bg-card);
}

.stats-table .mono {
    font-family: var(--font-mono);
    color: var(--accent-secondary);
}

/* Architecture Diagram */
.pipeline-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin: var(--space-xl) 0;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    min-width: 120px;
    text-align: center;
}

.pipeline-step-icon {
    font-size: 1.5rem;
}

.pipeline-step-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pipeline-step-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pipeline-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Threat Vector Cards */
.threat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

.threat-card {
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.threat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.threat-card.harm::before {
    background: var(--harm-color);
}

.threat-card.deception::before {
    background: var(--deception-color);
}

.threat-card.power::before {
    background: var(--power-color);
}

.threat-card.sycophancy::before {
    background: var(--sycophancy-color);
}

.threat-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.threat-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.threat-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Case Study */
.case-study {
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin: var(--space-xl) 0;
}

.case-study-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.case-study-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.case-study-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.case-study-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.case-study-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

.case-study-stats {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.case-stat {
    text-align: left;
}

.case-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.case-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Code Blocks */
.code-inline {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--accent-secondary);
}

/* CTA Section */
.report-cta {
    padding: var(--space-4xl) 0;
    text-align: center;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.cta-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 auto;
    width: 100%;
}

.cta-note {
    margin-top: var(--space-xl);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Responsive - Tablet */
@media (max-width: 960px) {
    .report-container {
        padding: 0 var(--space-md);
    }

    .report-section {
        padding: var(--space-2xl) 0;
    }

    .report-section h2 {
        font-size: 1.6rem;
    }

    .report-section h3 {
        font-size: 1.2rem;
    }

    .stats-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .stats-table th,
    .stats-table td {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .report-layout {
        padding-top: 60px;
    }

    .report-container {
        padding: 0 var(--space-md);
    }

    .report-hero {
        padding: var(--space-xl) 0 var(--space-lg);
    }

    .report-meta {
        gap: var(--space-sm);
        flex-direction: column;
    }

    .report-title {
        font-size: 1.6rem;
        margin-bottom: var(--space-md);
        line-height: 1.25;
    }

    .report-title br {
        display: none;
    }

    .report-subtitle {
        font-size: 0.95rem;
        margin-bottom: var(--space-lg);
        padding: 0;
        line-height: 1.7;
    }

    .report-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        max-width: 300px;
    }

    .report-stat {
        padding: var(--space-md) var(--space-sm);
    }

    .report-stat-value {
        font-size: 1.5rem;
    }

    .report-stat-label {
        font-size: 0.7rem;
        line-height: 1.3;
    }

    /* Section spacing */
    .report-section {
        padding: var(--space-xl) 0;
    }

    .report-section h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .report-section h3 {
        font-size: 1.15rem;
        margin-top: var(--space-xl);
    }

    .report-section h4 {
        font-size: 1rem;
    }

    .report-section p {
        font-size: 0.95rem;
        line-height: 1.75;
    }

    /* Chart Mobile Optimization - full bleed */
    .chart-container {
        margin: var(--space-md) calc(-1 * var(--space-md));
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Mobile bullet points */
    .report-section ul,
    .report-section ol {
        margin-left: var(--space-sm);
        padding-left: var(--space-md);
    }

    .report-section li {
        padding-left: var(--space-xs);
        font-size: 0.9rem;
        line-height: 1.7;
        margin-bottom: var(--space-xs);
    }

    /* Mobile: optimized chart heights */
    .chart-frame {
        height: 380px;
        min-height: 380px;
    }

    .chart-frame-tall {
        height: 480px;
        min-height: 480px;
    }

    .chart-frame-xl {
        height: 520px;
        min-height: 520px;
    }

    .chart-frame-short {
        height: 360px;
        min-height: 360px;
    }

    .chart-frame--pie {
        height: 380px;
        min-height: 380px;
    }

    /* Ensure iframes fill container and don't scroll */
    .chart-frame iframe,
    .chart-frame-tall iframe,
    .chart-frame-xl iframe,
    .chart-frame-short iframe {
        width: 100% !important;
        height: 100% !important;
        border: none;
        overflow: hidden;
    }

    /* Chart Grid Mobile - single column */
    .chart-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        margin: var(--space-md) 0;
    }

    /* Pipeline Diagram Mobile - compact vertical */
    .pipeline-diagram {
        flex-direction: column;
        padding: var(--space-md);
        gap: 0;
        margin: var(--space-md) calc(-1 * var(--space-md));
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .pipeline-step {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-md);
        min-width: unset;
        text-align: left;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--border-color);
        background: transparent;
    }

    .pipeline-step:last-of-type {
        border-bottom: none;
    }

    .pipeline-step-icon {
        font-size: 1.1rem;
        min-width: 24px;
        text-align: center;
    }

    .pipeline-step-name {
        font-size: 0.8rem;
    }

    .pipeline-step-desc {
        font-size: 0.7rem;
    }

    .pipeline-arrow {
        display: none;
    }

    /* Threat Grid Mobile */
    .threat-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        margin: var(--space-md) calc(-1 * var(--space-md));
    }

    .threat-card {
        padding: var(--space-md);
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin: 0;
    }

    .threat-icon {
        font-size: 1.2rem;
    }

    .threat-name {
        font-size: 0.9rem;
    }

    .threat-desc {
        font-size: 0.8rem;
    }

    /* Case Study Mobile - full bleed */
    .case-study {
        padding: var(--space-md);
        margin: var(--space-md) calc(-1 * var(--space-md));
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .case-study-header {
        flex-direction: row;
        align-items: center;
        gap: var(--space-sm);
    }

    .case-study-icon {
        font-size: 1.3rem;
    }

    .case-study-title {
        font-size: 1rem;
    }

    .case-study-subtitle {
        font-size: 0.8rem;
    }

    .case-study-content {
        font-size: 0.9rem;
    }

    .case-study-content ul {
        margin-left: 0;
        padding-left: var(--space-md);
    }

    .case-study-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .case-stat {
        text-align: center;
        padding: var(--space-sm);
        background: var(--bg-tertiary);
        border-radius: var(--radius-sm);
    }

    .case-stat-value {
        font-size: 1.3rem;
    }

    .case-stat-label {
        font-size: 0.7rem;
    }

    /* Insight Box Mobile - full bleed */
    .insight-box {
        padding: var(--space-md);
        margin: var(--space-md) calc(-1 * var(--space-md));
        border-radius: 0;
        border-left-width: 3px;
    }

    .insight-title {
        font-size: 0.9rem;
    }

    .insight-box p {
        font-size: 0.9rem;
    }

    .insight-box ul {
        margin-left: 0;
        padding-left: var(--space-md);
    }

    /* CTA Section Mobile */
    .report-cta {
        padding: var(--space-xl) var(--space-md);
    }

    .cta-title {
        font-size: 1.4rem;
    }

    .cta-text {
        font-size: 0.9rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .cta-note {
        font-size: 0.8rem;
    }

    /* Blockquotes */
    blockquote {
        margin: var(--space-md) calc(-1 * var(--space-md)) !important;
        padding: var(--space-md) !important;
        padding-left: var(--space-lg) !important;
        font-size: 0.9rem !important;
        border-radius: 0;
    }

    blockquote span {
        display: block;
        margin-top: var(--space-sm);
    }
}

/* Extra Small Devices (<480px) */
@media (max-width: 480px) {
    .report-container {
        padding: 0 var(--space-sm);
    }

    .report-hero {
        padding: var(--space-lg) 0;
    }

    .report-title {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    .report-subtitle {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .report-badge {
        font-size: 0.65rem;
        padding: 4px var(--space-sm);
    }

    .report-date {
        font-size: 0.75rem;
    }

    .report-date svg {
        width: 14px;
        height: 14px;
    }

    .report-stats {
        gap: 6px;
    }

    .report-stat {
        padding: var(--space-sm) 4px;
    }

    .report-stat-value {
        font-size: 1.25rem;
    }

    .report-stat-label {
        font-size: 0.6rem;
    }

    /* Section spacing */
    .report-section {
        padding: var(--space-lg) 0;
    }

    .section-number {
        font-size: 0.65rem;
    }

    .report-section h2 {
        font-size: 1.3rem;
    }

    .report-section h3 {
        font-size: 1.05rem;
    }

    .report-section h4 {
        font-size: 0.95rem;
    }

    .report-section p {
        font-size: 0.88rem;
    }

    .report-section li {
        font-size: 0.85rem;
    }

    /* Extra small: compact charts */
    .chart-container {
        margin: var(--space-sm) calc(-1 * var(--space-sm));
    }

    .chart-frame {
        height: 340px;
        min-height: 340px;
    }

    .chart-frame-tall {
        height: 430px;
        min-height: 430px;
    }

    .chart-frame-xl {
        height: 460px;
        min-height: 460px;
    }

    .chart-frame-short {
        height: 320px;
        min-height: 320px;
    }

    .chart-frame--pie {
        height: 340px;
        min-height: 340px;
    }

    /* Pipeline ultra-compact */
    .pipeline-diagram {
        margin: var(--space-sm) calc(-1 * var(--space-sm));
        padding: var(--space-sm);
    }

    .pipeline-step {
        padding: var(--space-xs) var(--space-sm);
    }

    .pipeline-step-icon {
        font-size: 1rem;
        min-width: 20px;
    }

    .pipeline-step-name {
        font-size: 0.75rem;
    }

    .pipeline-step-desc {
        font-size: 0.65rem;
    }

    /* Threat cards */
    .threat-grid {
        margin: var(--space-sm) calc(-1 * var(--space-sm));
    }

    .threat-card {
        padding: var(--space-sm) var(--space-md);
    }

    .threat-icon {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .threat-name {
        font-size: 0.85rem;
    }

    .threat-desc {
        font-size: 0.75rem;
    }

    /* Case study ultra-compact */
    .case-study {
        margin: var(--space-sm) calc(-1 * var(--space-sm));
        padding: var(--space-sm);
    }

    .case-study-icon {
        font-size: 1.1rem;
    }

    .case-study-title {
        font-size: 0.9rem;
    }

    .case-study-subtitle {
        font-size: 0.7rem;
    }

    .case-study-content {
        font-size: 0.85rem;
    }

    .case-stat-value {
        font-size: 1.1rem;
    }

    .case-stat-label {
        font-size: 0.6rem;
    }

    /* Insight box */
    .insight-box {
        margin: var(--space-sm) calc(-1 * var(--space-sm));
        padding: var(--space-sm);
    }

    .insight-title {
        font-size: 0.85rem;
    }

    .insight-box p {
        font-size: 0.85rem;
    }

    /* CTA */
    .report-cta {
        padding: var(--space-lg) var(--space-sm);
    }

    .cta-title {
        font-size: 1.2rem;
    }

    .cta-text {
        font-size: 0.85rem;
    }

    .cta-note {
        font-size: 0.75rem;
    }

    /* Blockquotes */
    blockquote {
        margin: var(--space-sm) calc(-1 * var(--space-sm)) !important;
        padding: var(--space-sm) !important;
        padding-left: var(--space-md) !important;
        font-size: 0.85rem !important;
    }

    /* Code inline */
    .code-inline,
    code {
        font-size: 0.8em;
        padding: 1px 4px;
    }
}

/* Plotly Chart Mobile Optimizations */
.chart-container iframe,
.chart-container .plotly-graph-div {
    touch-action: pan-x pan-y;
}

/* Ensure Plotly charts are responsive and NO scrolling */
.chart-frame iframe,
.chart-frame-tall iframe,
.chart-frame-xl iframe,
.chart-frame-short iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    overflow: hidden;
}

/* Force charts to display fully */
.chart-container {
    overflow: visible;
}

.chart-frame,
.chart-frame-tall,
.chart-frame-xl,
.chart-frame-short {
    overflow: hidden;
}

/* Improve touch targets for Plotly */
@media (pointer: coarse) {
    .chart-container {
        min-height: 350px;
    }

    /* Add padding for touch interaction */
    .chart-frame {
        padding: var(--space-xs);
    }
}

/* Bar charts and histograms need extra height */
.chart-frame--bar,
.chart-frame--histogram {
    height: 450px;
    min-height: 450px;
}

@media (max-width: 768px) {

    .chart-frame--bar,
    .chart-frame--histogram {
        height: 420px;
        min-height: 420px;
    }
}

@media (max-width: 480px) {

    .chart-frame--bar,
    .chart-frame--histogram {
        height: 380px;
        min-height: 380px;
    }
}

/* Leaderboard Iframe with scrolling enabled */
.chart-frame--leaderboard {
    height: 600px;
    min-height: 600px;
    overflow: auto;
}

.chart-frame--leaderboard iframe {
    width: 100% !important;
    height: 100%;
}

@media (max-width: 768px) {
    .chart-frame--leaderboard {
        height: 450px;
        min-height: 450px;
        margin: 0 calc(-1 * var(--space-md));
        width: calc(100% + var(--space-md) * 2);
        border-radius: 0;
    }

    .chart-frame--leaderboard iframe {
        width: 100% !important;
        height: 100%;
    }

    .chart-frame--growth {
        height: 1700px;
        min-height: 1700px;
    }
}

@media (max-width: 480px) {
    .chart-frame--leaderboard {
        height: 400px;
        min-height: 400px;
        margin: 0 calc(-1 * var(--space-sm));
        width: calc(100% + var(--space-sm) * 2);
    }

    .chart-frame--leaderboard iframe {
        width: 100% !important;
        height: 100%;
    }

    .chart-frame--growth {
        height: 1600px;
        min-height: 1600px;
    }
}

/* Stats Table - Mobile responsive */
@media (max-width: 768px) {
    .stats-table {
        display: block;
        width: 100%;
        font-size: 0.75rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: var(--space-md) calc(-1 * var(--space-md));
        width: calc(100% + var(--space-md) * 2);
    }

    .stats-table thead,
    .stats-table tbody,
    .stats-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .stats-table th,
    .stats-table td {
        padding: var(--space-xs) var(--space-sm);
        word-break: break-word;
        white-space: normal;
        line-height: 1.4;
    }

    .stats-table th:first-child,
    .stats-table td:first-child {
        padding-left: var(--space-md);
    }

    .stats-table th:last-child,
    .stats-table td:last-child {
        padding-right: var(--space-md);
    }

    /* Hide interpretation column on mobile (4th column) */
    .stats-table th:nth-child(4),
    .stats-table td:nth-child(4) {
        display: none;
    }

    /* Also hide 5th column if exists */
    .stats-table th:nth-child(5),
    .stats-table td:nth-child(5) {
        display: none;
    }

    .stats-table .mono {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .stats-table {
        font-size: 0.65rem;
        margin: var(--space-sm) calc(-1 * var(--space-sm));
        width: calc(100% + var(--space-sm) * 2);
    }

    .stats-table th,
    .stats-table td {
        padding: 4px 6px;
    }

    .stats-table th:first-child,
    .stats-table td:first-child {
        padding-left: var(--space-sm);
    }

    .stats-table th:last-child,
    .stats-table td:last-child {
        padding-right: var(--space-sm);
    }

    .stats-table .mono {
        font-size: 0.6rem;
    }

    /* Hide 3rd column too on very small screens */
    .stats-table th:nth-child(3),
    .stats-table td:nth-child(3) {
        display: none;
    }
}

/* Report Stats Grid - tablet breakpoint for 2x2 */
@media (max-width: 600px) {
    .report-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
        max-width: 320px;
    }
}

/* Pipeline Diagram - base centering (mobile styles in main media queries above) */
.pipeline-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-lg);
    max-width: 100%;
    margin: var(--space-lg) auto;
}

/* ============================================
   MOBILE ENHANCEMENTS - Safe areas, touch, and polish
   ============================================ */

/* Safe area support for notched phones */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .report-container {
            padding-left: max(var(--space-md), env(safe-area-inset-left));
            padding-right: max(var(--space-md), env(safe-area-inset-right));
        }

        .report-cta {
            padding-bottom: max(var(--space-xl), env(safe-area-inset-bottom));
        }
    }

    @media (max-width: 480px) {
        .report-container {
            padding-left: max(var(--space-sm), env(safe-area-inset-left));
            padding-right: max(var(--space-sm), env(safe-area-inset-right));
        }
    }
}

/* Better tap targets for mobile */
@media (max-width: 768px) {
    .report-section a {
        padding: 2px 0;
    }

    .btn {
        min-height: 48px;
        padding: var(--space-md) var(--space-lg);
    }

    /* Improve readability */
    .report-section p,
    .report-section li,
    .insight-box p,
    .case-study-content {
        word-spacing: 0.02em;
    }

    /* Smoother transitions */
    .chart-container,
    .insight-box,
    .case-study,
    .threat-card,
    .pipeline-diagram {
        transition: none;
    }
}

/* Prevent horizontal overflow on mobile */
@media (max-width: 768px) {
    .report-layout {
        overflow-x: hidden;
    }

    /* Ensure images don't break layout */
    .report-section img {
        max-width: 100%;
        height: auto;
    }

    /* Better gradient text on mobile */
    .gradient-text {
        background-size: 100%;
        -webkit-background-clip: text;
        background-clip: text;
    }
}