/* Studio Praxis - Print & Report Identity */
@media print {
    /* 1. Hide UI elements like the sidebar and buttons */
    .no-print { display: none !important; }
    
    /* 2. KILL THE BROWSER HEADERS/FOOTERS */
    @page {
        margin: 0; /* Setting this to 0 prevents the URL and Date from printing */
    }
    
 body.report-body { 
        background-color: #FFFFFF; 
        /* Top, Right, Bottom, Left. We give the bottom 1.2 inches of space so text doesn't hit our new footer */
        padding: 0.75in 0.75in 1.2in 0.75in !important; 
        max-width: 100%;
    }

    /* Force the footer to print at the bottom of EVERY page */
    .report-footer {
        position: fixed;
        bottom: 0;
        left: 0.75in;
        right: 0.75in;
        margin-top: 0;
        padding-top: 15px;
        padding-bottom: 0.4in; /* Hovers nicely inside the physical page margin */
        background-color: #FFFFFF;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* 3. Force browsers to print our warm background colors and chart fills */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* 4. PREVENT AWKWARD PAGE BREAKS */
    .score-summary-box,
    .analysis-item,
    .comparison-table,
    .progress-header,
    .report-header,
    canvas {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    div[style*="background: var(--warm-off-white)"] {
        page-break-inside: avoid;
        break-inside: avoid;
        margin-bottom: 20px; 
    }

    div[style*="height: 400px"], 
    div[style*="height: 450px"] {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    footer {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

:root {
    --report-charcoal: #333333;
    --report-accent: #4A5D6A;
    --report-line: rgba(51, 51, 51, 0.15);
}

.report-body {
    max-width: 850px;
    margin: 0 auto;
    padding: 60px;
    background-color: #FFFFFF;
    color: var(--report-charcoal);
    font-family: "EB Garamond", serif;
}

/* Metadata Header */
.report-header {
    border-bottom: 2px solid var(--report-charcoal);
    padding-bottom: 20px;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.metadata-table {
    width: 100%;
    font-family: "Inter", sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
}

.metadata-table td { padding: 5px 0; border-bottom: 1px solid var(--report-line); }

/* Score Summary Box */
.score-summary-box {
    border: 1px solid var(--report-charcoal);
    padding: 30px;
    margin: 40px 0;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.overall-score-circle {
    text-align: center;
    border-right: 1px solid var(--report-line);
}

.score-value {
    font-size: 4rem;
    display: block;
    line-height: 1;
}

/* Criterion Analysis Layout */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.analysis-item {
    margin-bottom: 30px;
}

.analysis-item h4 {
    font-family: "Inter", sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--report-line);
    padding-bottom: 5px;
}

.strength-tag {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--report-accent);
    margin-top: 10px;
    display: block;
}

/* Progress-specific styles */
.delta-positive {
    color: var(--report-accent);
    font-weight: bold;
    margin-left: 5px;
}

.delta-stable {
    color: #888;
    font-size: 0.8rem;
    margin-left: 5px;
}

.comparison-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    font-family: "Inter", sans-serif;
    font-size: 0.85rem;
}

.comparison-table th {
    text-align: left;
    border-bottom: 1px solid var(--report-charcoal);
    padding: 10px 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table td {
    padding: 12px 5px;
    border-bottom: 1px solid var(--report-line);
}

.progress-header {
    background: rgba(74, 93, 106, 0.05);
    padding: 20px;
    border-left: 3px solid var(--report-accent);
    margin: 20px 0 40px 0;
}

/* Persistent Footer Styles */
.report-footer {
    margin-top: 80px;
    padding-top: 20px;
    border-top: 1px solid var(--report-line);
    text-align: center;
}

.report-footer-content {
    font-family: "Inter", sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--report-charcoal);
    opacity: 0.6;
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}