:root {
    --blue-900: #0f2747;
    --blue-800: #153a66;
    --blue-700: #1e4f8f;
    --blue-600: #2563eb;
    --blue-100: #eaf2ff;
    --blue-50: #f5f8ff;
    --gray-900: #1f2937;
    --gray-700: #374151;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --danger: #d92d20;
    --shadow: 0 16px 40px rgba(15, 39, 71, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 34%),
        linear-gradient(180deg, #f6f9ff 0%, #eef3fb 100%);
    color: var(--gray-900);
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 34px 36px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
    color: var(--white);
    box-shadow: var(--shadow);
}

.eyebrow {
    font-size: 13px;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.72);
    margin-bottom: 10px;
    font-weight: 700;
}

.header h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.header p {
    margin: 12px 0 0;
    color: rgba(255,255,255,0.82);
    font-size: 16px;
}

.status-badge {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,0.32);
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    font-size: 14px;
    font-weight: 700;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 22px 0;
}

.stat-card {
    background: var(--white);
    border: 1px solid rgba(30, 79, 143, 0.10);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(15, 39, 71, 0.06);
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 10px;
}

.stat-card strong {
    display: inline-block;
    font-size: 30px;
    line-height: 1;
    color: var(--blue-900);
    letter-spacing: -0.04em;
}

.stat-unit {
    margin-left: 4px;
    color: var(--gray-500);
    font-size: 15px;
}

.stat-card .keyword,
.stat-card .normal {
    font-size: 24px;
}

.filter-box,
.media-summary,
.article-section {
    background: var(--white);
    border: 1px solid rgba(30, 79, 143, 0.10);
    border-radius: var(--radius);
    padding: 26px;
    margin-top: 22px;
    box-shadow: 0 8px 24px rgba(15, 39, 71, 0.06);
}

.filter-title {
    font-size: 19px;
    font-weight: 800;
    color: var(--blue-900);
    margin-bottom: 18px;
}

.filters {
    display: grid;
    grid-template-columns: 180px 200px 1fr 110px;
    gap: 14px;
    align-items: end;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
}

select,
input {
    width: 100%;
    height: 44px;
    border: 1px solid #c9d7ee;
    border-radius: 12px;
    background: var(--white);
    color: var(--gray-900);
    padding: 0 14px;
    font-size: 15px;
    outline: none;
}

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--blue-700) 50%),
        linear-gradient(135deg, var(--blue-700) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 19px,
        calc(100% - 12px) 19px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

select:focus,
input:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--blue-800);
    color: var(--white);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

button:hover {
    background: var(--blue-700);
}

h2 {
    margin: 0 0 18px;
    color: var(--blue-900);
    font-size: 22px;
    letter-spacing: -0.03em;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.media-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--blue-50);
    border: 1px solid #d9e7ff;
}

.media-card span {
    font-size: 15px;
    color: var(--gray-700);
    font-weight: 700;
}

.media-card strong {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--blue-800);
    color: var(--white);
    font-size: 15px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 18px;
}

.section-head h2 {
    margin-bottom: 4px;
}

.section-head p {
    margin: 0;
    color: var(--gray-500);
    font-size: 14px;
}

.date-group {
    margin-top: 26px;
}

.date-group h3 {
    display: inline-flex;
    align-items: center;
    margin: 0 0 14px;
    padding: 8px 13px;
    border-radius: 999px;
    background: var(--blue-100);
    color: var(--blue-900);
    font-size: 15px;
}

.article-list {
    display: grid;
    gap: 12px;
}

.article-card {
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 18px;
    background: var(--white);
    transition: 0.16s ease;
}

.article-card:hover {
    border-color: #bdd3f5;
    box-shadow: 0 10px 28px rgba(15, 39, 71, 0.08);
    transform: translateY(-1px);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--gray-500);
    font-size: 13px;
}

.media-name {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--blue-50);
    color: var(--blue-800);
    font-weight: 800;
}

.collected-time {
    white-space: nowrap;
}

.article-card h4 {
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
    letter-spacing: -0.03em;
    color: var(--gray-900);
    word-break: keep-all;
}

.risk-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #fff1f0;
    color: var(--danger);
    font-size: 12px;
    font-weight: 900;
    vertical-align: 2px;
}

.article-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.article-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--blue-800);
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.article-actions a:hover {
    background: var(--blue-700);
}

@media (max-width: 960px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .button-field {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .page {
        width: min(100% - 20px, 1180px);
        margin: 16px auto;
    }

    .header {
        display: block;
        padding: 26px 22px;
    }

    .header h1 {
        font-size: 28px;
    }

    .header p {
        font-size: 14px;
    }

    .status-badge {
        display: inline-flex;
        margin-top: 18px;
    }

    .stats,
    .filters,
    .media-grid {
        grid-template-columns: 1fr;
    }

    .button-field {
        grid-column: auto;
    }

    .filter-box,
    .media-summary,
    .article-section {
        padding: 20px;
        border-radius: 16px;
    }

    .section-head {
        display: block;
    }

    .article-meta {
        display: block;
    }

    .collected-time {
        display: block;
        margin-top: 8px;
    }

    .article-card h4 {
        font-size: 16px;
    }

    .article-actions {
        justify-content: stretch;
    }

    .article-actions a {
        width: 100%;
    }
}