@font-face {
    font-family: 'Paperlogy';
    src: url('./fonts/Paperlogy-1Thin.subset.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('./fonts/Paperlogy-2ExtraLight.subset.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('./fonts/Paperlogy-3Light.subset.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('./fonts/Paperlogy-4Regular.subset.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('./fonts/Paperlogy-5Medium.subset.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('./fonts/Paperlogy-6SemiBold.subset.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('./fonts/Paperlogy-7Bold.subset.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('./fonts/Paperlogy-8ExtraBold.subset.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('./fonts/Paperlogy-9Black.subset.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #0052cc;
    --background-color: #f0f2f5;
    --text-color: #172b4d;
    --card-background-color: #ffffff;
    --card-border-color: #dfe1e6;
    --white-text: #ffffff;
    --subtle-text-color: #6b778c;
}

body {
    font-family: "Paperlogy", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 40px 0;
    line-height: 1.6;
}

.report-container, .details-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    background-color: var(--card-background-color);
    border: 1px solid var(--card-border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 40px;
    box-sizing: border-box;
    height: auto !important;
}

.report-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* 로고를 위로 정렬 */
}

.report-header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin: 0;
}

.report-header p {
    font-size: 1.1rem;
    color: var(--subtle-text-color);
    margin: 5px 0 0;
}

.report-header .logo {
    max-height: 65px; /* 로고 크기 약간 키움 */
    margin-left: 40px;
    /* margin-top: 5px; */ /* 로고 상단 여백 제거 */
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media screen and (min-width: 769px) {
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    }
}

.grid-item {
    background-color: var(--card-background-color);
    border: 1px solid var(--card-border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.grid-item h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.key-takeaways-box p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0;
}

.kpi-container {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 15px;
}
.stat-block {
    text-align: center;
    padding: 15px;
    border: 1px solid var(--card-border-color);
    border-radius: 6px;
    background-color: #f7f9fc;
}
.stat-block .label {
    font-size: 1rem;
    color: var(--subtle-text-color);
    margin-bottom: 8px;
    display: block;
}
.stat-block .value {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary-color);
}
.stat-block .value.alert {
    color: #d93025;
}

.recommendation-block ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}
.recommendation-block li {
    font-size: 1.1rem;
    line-height: 1.7;
    padding-left: 25px;
    position: relative;
}
.recommendation-block li:not(:last-child) {
    margin-bottom: 15px;
}
.recommendation-block li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Detailed Section Styles */
.details-container h2 {
    font-size: 2rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
    height: auto !important;
}

.card {
    background-color: var(--card-background-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.card-header::after {
    content: '▼'; /* 펼쳐진 상태 아이콘 */
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
}

.card-header.collapsed::after {
    content: '►'; /* 접힌 상태 아이콘 */
}

.card-body {
    padding: 20px;
    max-height: 1000px; /* 내용에 따라 충분한 높이 설정 */
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding-top 0.4s ease-in-out, padding-bottom 0.4s ease-in-out;
}

.card-header.collapsed + .card-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.card-body p {
    margin-bottom: 15px;
}

.card-body .publication-date {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--subtle-text-color);
    margin-bottom: 15px;
}

.card-body a.source-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
}

.card-body a.source-link:hover {
    text-decoration: underline;
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
    .grid-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 20px !important;
    }
    
    .grid-item {
        width: 100% !important;
        margin-bottom: 0 !important;
        padding: 20px;
        grid-column: 1 !important; /* Force all items to single column */
    }
}

/* Extra small mobile devices */
@media screen and (max-width: 480px) {
    .grid-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 15px !important;
    }
    
    .grid-item {
        width: 100% !important;
        margin-bottom: 0 !important;
        padding: 15px;
        grid-column: 1 !important; /* Force all items to single column */
    }
    
    .grid-item h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .report-container, .details-container {
        padding: 20px;
        margin: 0 auto 20px auto;
        height: auto !important;
    }
    
    .report-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .report-header .logo {
        margin-left: 0;
        margin-top: 15px;
        max-height: 50px;
    }
    
    .report-header h1 {
        font-size: 2rem;
    }
    
    .stat-block .value {
        font-size: 1.8rem;
    }
    
    .key-takeaways-box p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .recommendation-block li {
        font-size: 1rem;
        line-height: 1.6;
    }
}


/* Tables */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.comparison-table th {
    background-color: var(--soft-blue);
    color: var(--primary-color);
    text-align: left;
    padding: 12px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--card-border-color);
}

.comparison-table td {
    padding: 12px;
    border-bottom: 1px solid var(--card-border-color);
    font-size: 0.95rem;
    vertical-align: top;
}

.comparison-table td:first-child {
    font-weight: 700;
    color: var(--primary-color);
    width: 20%;
}

/* Method Cards */
.method-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.mini-card {
    background: var(--soft-blue);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.chip {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
}


.ref-toggle-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.ref-toggle-btn:hover { opacity: 0.8; }
.ref-panel {
    display: none;
    margin-top: 10px;
    padding: 12px;
    background: var(--card-background-color);
    border: 1px solid var(--card-border-color);
    border-radius: 6px;
}
.ref-panel.active { display: block; }
.ref-panel img { max-width: 100%; margin-bottom: 8px; }
.ref-panel a { color: var(--primary-color); text-decoration: underline; }