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

/* Root & Body */
body {
    background: #f8fafc;
    color: #374151;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

/* Report Page Template */
.report-page {
    min-height: 100vh;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.page-inner {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Page Numbers */
.page-number {
    position: absolute;
    bottom: 2rem;
    right: 3rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: #374151;
    opacity: 0.5;
    letter-spacing: 0.1em;
}

/* ==================== COVER SECTION ==================== */
#cover {
    min-height: 100vh;
    background: #0d1b3e;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: none;
}

.cover-pattern {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(255, 255, 255, 0.03) 59px, rgba(255, 255, 255, 0.03) 60px),
        repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255, 255, 255, 0.03) 59px, rgba(255, 255, 255, 0.03) 60px);
    z-index: 0;
}

.cover-watermark {
    position: absolute;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 30vw;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.03);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    white-space: nowrap;
}

.cover-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.cover-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 1rem;
    font-weight: 400;
}

.cover-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cover-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    margin-bottom: 2rem;
    font-weight: 400;
}

.cover-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #e2e8f0;
    opacity: 0.7;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

#cover .page-number {
    color: #e2e8f0;
}

/* ==================== SECTION HEADINGS ==================== */
.section-heading {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #0d1b3e;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 4px solid #0d1b3e;
    letter-spacing: -0.01em;
}

/* ==================== EXECUTIVE SUMMARY ==================== */
.summary-panel {
    border: 1px solid #e2e8f0;
    border-top: 4px solid #0d1b3e;
    border-radius: 4px;
    padding: 2rem;
}

.summary-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1.5rem;
}

.summary-text:last-child {
    margin-bottom: 0;
}

/* ==================== KEY METRICS ==================== */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.metric-card {
    border: 1px solid #e2e8f0;
    border-top: 4px solid #0d1b3e;
    border-radius: 4px;
    padding: 2rem;
    text-align: center;
    background: #ffffff;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.metric-card:hover {
    box-shadow: 0 2px 8px rgba(13, 27, 62, 0.1);
    transform: translateY(-2px);
}

.metric-value {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 3rem;
    font-variant-numeric: tabular-nums;
    color: #2563eb;
    margin-bottom: 0.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.metric-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.metric-trend {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 400;
}

.metric-trend.up {
    color: #059669;
}

.metric-trend.down {
    color: #d97706;
}

/* ==================== TABLE ==================== */
.report-table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.report-table thead tr {
    background: #0d1b3e;
    color: #ffffff;
}

.report-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.report-table th:last-child {
    border-right: none;
}

.report-table td {
    padding: 0.75rem 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
}

.report-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

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

.positive {
    color: #059669;
    font-weight: 400;
}

.negative {
    color: #d97706;
    font-weight: 400;
}

/* Footnotes */
.footnote {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: #374151;
    margin-top: 1rem;
    opacity: 0.7;
}

sup {
    color: #2563eb;
    font-weight: 600;
}

/* ==================== CHART SECTION ==================== */
.chart-container {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2rem;
    background: #ffffff;
}

.line-chart {
    width: 100%;
    max-height: 250px;
    display: block;
}

.chart-legend {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.legend-item {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

.legend-line {
    width: 20px;
    height: 2px;
    display: inline-block;
}

.legend-line.blue {
    background: #2563eb;
}

.legend-line.green {
    background: #059669;
}

/* ==================== METHODOLOGY SECTION ==================== */
.methodology-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.methodology-block {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2rem;
    background: #ffffff;
}

.block-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #0d1b3e;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.block-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
}

/* ==================== CONCLUSION SECTION ==================== */
.conclusion-content {
    max-width: 750px;
}

.conclusion-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1.5rem;
}

.recommendations {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 4px;
    padding: 1.5rem;
    background: #f8fafc;
    margin-top: 2rem;
}

.rec-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #0d1b3e;
    margin-bottom: 1rem;
}

.rec-list {
    list-style: none;
    padding: 0;
}

.rec-list li {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.rec-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #2563eb;
}

.rec-list li:last-child {
    margin-bottom: 0;
}

/* ==================== FOOTER SECTION ==================== */
.report-footer {
    text-align: center;
}

.footer-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.8rem;
    color: #0d1b3e;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.footer-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 1rem;
    font-weight: 400;
}

.footer-disclaimer {
    font-size: 0.8rem;
    color: #374151;
    opacity: 0.6;
    margin-bottom: 0.75rem;
}

.footer-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #374151;
    opacity: 0.5;
    font-weight: 400;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .methodology-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }

    .report-page {
        padding: 2rem 1.5rem;
    }

    .page-number {
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 0.65rem;
    }

    #cover .page-number {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .cover-title {
        font-size: clamp(1.8rem, 4vw, 3rem);
    }

    .section-heading {
        font-size: clamp(1.2rem, 2.5vw, 2rem);
    }

    .page-inner {
        padding: 0;
    }

    .metric-value {
        font-size: 2.2rem;
    }

    .cover-watermark {
        font-size: 25vw;
    }

    .chart-legend {
        gap: 1rem;
    }

    .methodology-block {
        padding: 1.5rem;
    }

    .recommendations {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .report-page {
        padding: 1.5rem 1rem;
        min-height: auto;
    }

    .page-inner {
        width: 100%;
    }

    .cover-title {
        font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    }

    .section-heading {
        font-size: clamp(1.1rem, 2vw, 1.8rem);
        margin-bottom: 1.5rem;
    }

    .metric-value {
        font-size: 2rem;
    }

    .metric-label {
        font-size: 0.75rem;
    }

    .metric-trend {
        font-size: 0.8rem;
    }

    .metric-card {
        padding: 1.5rem;
    }

    .summary-panel {
        padding: 1.5rem;
    }

    .chart-container {
        padding: 1.5rem;
    }

    .cover-subtitle {
        font-size: 0.9rem;
    }

    .cover-label {
        font-size: 0.7rem;
    }

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

    .report-table th,
    .report-table td {
        padding: 0.5rem 0.75rem;
    }

    .page-number {
        font-size: 0.6rem;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    body {
        background: #ffffff;
    }

    .report-page {
        page-break-after: always;
        min-height: auto;
        padding: 1in;
        border-bottom: none;
        background: #ffffff;
    }

    #cover {
        page-break-after: always;
        min-height: auto;
        padding: 1in;
    }

    .page-number {
        display: none;
    }

    #cover .page-number {
        display: none;
    }

    a {
        color: #2563eb;
        text-decoration: none;
    }

    .chart-container,
    .metric-card,
    .summary-panel,
    .methodology-block,
    .recommendations {
        break-inside: avoid;
    }

    .section-heading {
        break-after: avoid;
    }
}
