* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== Theme Variables ===== */
:root, [data-theme="white"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface2: #f5f5f5;
    --border: #ddd;
    --border-light: #eaeaea;
    --text: #1d1d1f;
    --text2: #6e6e73;
    --text3: #aeaeb2;
    --accent: #bf3626;
    --link: #1d1d1f;
    --link-hover: #bf3626;
    --rule: #1d1d1f;
    --rule-light: #d2d2d7;
    --danger: #bf3626;
    --success: #248a3d;
    --warning: #b25000;
}

[data-theme="sepia"] {
    --bg: #f4ecd8;
    --surface: #f4ecd8;
    --surface2: #ebe3cc;
    --border: #d4c9a8;
    --border-light: #ded4b8;
    --text: #362a18;
    --text2: #6b5c46;
    --text3: #9e8e72;
    --accent: #8b3a28;
    --link: #362a18;
    --link-hover: #8b3a28;
    --rule: #4a3c24;
    --rule-light: #c8bb98;
    --danger: #8b3a28;
    --success: #3a6828;
    --warning: #8b7828;
}

[data-theme="gray"] {
    --bg: #e8e8ed;
    --surface: #e8e8ed;
    --surface2: #dcdce2;
    --border: #c6c6cc;
    --border-light: #d1d1d6;
    --text: #1d1d1f;
    --text2: #636366;
    --text3: #8e8e93;
    --accent: #a8301e;
    --link: #1d1d1f;
    --link-hover: #a8301e;
    --rule: #3a3a3c;
    --rule-light: #b5b5ba;
    --danger: #a8301e;
    --success: #248a3d;
    --warning: #8a6a18;
}

[data-theme="dark"] {
    --bg: #1c1c1e;
    --surface: #1c1c1e;
    --surface2: #2c2c2e;
    --border: #3a3a3c;
    --border-light: #38383a;
    --text: #e5e5e7;
    --text2: #8e8e93;
    --text3: #636366;
    --accent: #ff6961;
    --link: #e5e5e7;
    --link-hover: #ff6961;
    --rule: #e5e5e7;
    --rule-light: #48484a;
    --danger: #ff6961;
    --success: #30d158;
    --warning: #ffd60a;
}

/* ===== Base ===== */
body {
    font-family: Charter, 'Bitstream Charter', 'Noto Serif KR', Georgia, serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.85;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s, color 0.3s;
}
a { color: var(--link); transition: color 0.15s; }
a:hover { color: var(--link-hover); }

/* ===== Sans-serif utility ===== */
.sans {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
}

/* ===== Navbar ===== */
.navbar {
    background: var(--surface);
    border-bottom: 2px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s, border-color 0.3s;
}

/* -- Masthead (newspaper-style centered header) -- */
.masthead {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 24px 20px;
    max-width: 740px;
    margin: 0 auto;
    position: relative;
}
.masthead-side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.masthead-left { left: 24px; }
.masthead-right { right: 24px; }

.logo {
    text-decoration: none;
    text-align: center;
    padding: 4px 0;
}
.logo-main {
    font-family: 'Times New Roman', 'Noto Serif KR', Georgia, serif;
    font-weight: 700;
    font-size: 1.65em;
    color: var(--text);
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    line-height: 1.1;
}

/* -- Header inline search -- */
.header-search {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 5px 10px;
    transition: border-color 0.2s;
}
.header-search:focus-within { border-color: var(--text2); }
.search-icon {
    color: var(--text3);
    flex-shrink: 0;
    transition: color 0.15s;
}
.header-search:focus-within .search-icon { color: var(--text2); }
.header-search input {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.78em;
    width: 64px;
    padding: 2px 0;
    outline: none;
    transition: width 0.25s ease;
}
.header-search input::placeholder { color: var(--text3); }
.header-search input:focus { width: 120px; }

/* -- Theme switcher -- */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
}
.theme-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}
.theme-btn:hover { transform: scale(1.15); }
.theme-btn.active { border-color: var(--text); box-shadow: 0 0 0 1.5px var(--bg), 0 0 0 3px var(--text); }
.theme-btn[data-theme="white"] { background: #fff; }
.theme-btn[data-theme="sepia"] { background: #f4ecd8; }
.theme-btn[data-theme="gray"] { background: #d8d8dd; }
.theme-btn[data-theme="dark"] { background: #1c1c1e; }

/* -- (hamburger removed, nav always visible) -- */

/* -- Nav links (category bar) -- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    max-width: 740px;
    margin: 0 auto;
    border-top: 1px solid var(--border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-group { display: flex; gap: 0; flex-shrink: 0; }
.nav-pages { display: flex; gap: 0; flex-shrink: 0; }
.nav-divider {
    width: 1px;
    height: 14px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 4px;
    align-self: center;
}

.nav-links a {
    color: var(--text2);
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    font-size: 0.75em;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 9px 12px;
    white-space: nowrap;
    transition: color 0.15s;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover {
    color: var(--text);
    border-bottom-color: var(--accent);
}

/* ===== Container ===== */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ===== Typography ===== */
h1 {
    font-family: 'Times New Roman', 'Noto Serif KR', Georgia, serif;
    font-weight: 700;
    font-size: 1.75em;
    line-height: 1.35;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}
h2 {
    font-family: 'Times New Roman', 'Noto Serif KR', Georgia, serif;
    font-weight: 700;
    font-size: 1.25em;
    line-height: 1.4;
    margin-bottom: 16px;
}

/* -- Page head (for sub-pages) -- */
.page-head {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}
.page-head h1 { margin-bottom: 4px; }
.page-sub {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.82em;
    color: var(--text3);
    letter-spacing: 0.2px;
}

/* -- Section head (newspaper-style divider) -- */
.section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 32px;
    margin-bottom: 4px;
    padding-top: 20px;
    border-top: 3px double var(--rule);
}
.section-label {
    font-family: 'Times New Roman', 'Noto Serif KR', Georgia, serif;
    font-weight: 700;
    font-size: 1.15em;
    color: var(--text);
}
.section-sub {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.75em;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Cards ===== */
.card {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    padding: 24px 0;
    margin-bottom: 0;
}

/* ===== Stats ===== */
.stats-grid {
    display: flex;
    border: 1px solid var(--border);
    margin-bottom: 28px;
}
.stat-card {
    flex: 1;
    padding: 14px 12px;
    text-align: center;
    border-right: 1px solid var(--border-light);
}
.stat-card:last-child { border-right: none; }
.stat-number {
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.stat-label {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.68em;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 4px;
}

/* ===== Category grid ===== */
.cat-grid {
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
}
.cat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    min-width: 100px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.82em;
    border-right: 1px solid var(--border-light);
    transition: background 0.15s;
}
.cat-card:last-child { border-right: none; }
.cat-card:hover { background: var(--surface2); }
.cat-count {
    font-family: 'Times New Roman', Georgia, serif;
    font-weight: 700;
    font-size: 0.95em;
    color: var(--accent);
}

/* ===== Article cards ===== */
.article-card {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}
.article-card:last-child { border-bottom: none; }
.article-card h3 {
    margin-top: 5px;
    font-family: 'Times New Roman', 'Noto Serif KR', Georgia, serif;
    font-size: 1.05em;
    font-weight: 600;
    line-height: 1.5;
}
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent); }
.article-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.75em;
    letter-spacing: 0.2px;
}
.source {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.date { color: var(--text3); }

/* ===== Badge ===== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.68em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--surface2);
    color: var(--text2);
    border-left: 3px solid var(--text3);
}
.cat-politics { border-left-color: #bf3626; }
.cat-economy { border-left-color: #b25000; }
.cat-society { border-left-color: #248a3d; }
.cat-culture { border-left-color: #8944ab; }
.cat-world { border-left-color: #2a6ab0; }
.cat-tech { border-left-color: #1a8a7a; }
.cat-sports { border-left-color: #c25000; }
.cat-general { border-left-color: #8e8e93; }

/* ===== Importance ===== */
.importance {
    color: var(--warning);
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.78em;
}

/* ===== Article detail ===== */
.article-detail h1 {
    margin: 20px 0 10px;
    font-size: 1.9em;
    line-height: 1.3;
}
.article-header {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.original-link {
    display: inline-block;
    margin: 10px 0 16px;
    color: var(--accent);
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.82em;
    font-weight: 500;
}
.original-link:hover { text-decoration: underline; }
.content-snippet {
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin: 16px 0;
    line-height: 2;
    font-size: 1.02em;
}

/* ===== AI Analysis ===== */
.ai-analysis {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 3px double var(--rule);
}
.ai-analysis h2 {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text2);
    margin-bottom: 20px;
}
.analysis-section { margin-bottom: 18px; }
.analysis-section h3, .analysis-section h4 {
    color: var(--text2);
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.72em;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.analysis-section p { line-height: 1.9; }
.analysis-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}
.sentiment { font-weight: 600; }

/* ===== Keywords ===== */
.keywords { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.keyword-tag {
    padding: 3px 10px;
    background: transparent;
    border: 1px solid var(--border);
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.72em;
    color: var(--text2);
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: all 0.15s;
}
.keyword-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Search page ===== */
.search-box {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--rule);
    padding-bottom: 0;
}
.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 12px 0;
    font-family: Charter, 'Noto Serif KR', Georgia, serif;
    font-size: 1.1em;
    outline: none;
}
.search-box input::placeholder { color: var(--text3); }
.search-box button {
    background: transparent;
    color: var(--text2);
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.82em;
    letter-spacing: 0.5px;
    transition: color 0.15s;
}
.search-box button:hover { color: var(--text); opacity: 1; }
footer button {
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 8px 20px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.82em;
    transition: opacity 0.15s;
}
footer button:hover { opacity: 0.8; }
.result-count {
    color: var(--text3);
    margin-bottom: 16px;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.82em;
}

/* ===== Archive ===== */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1px;
    background: var(--border-light);
    border: 1px solid var(--border);
}
.archive-card {
    padding: 14px;
    background: var(--surface);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 0.9em;
    transition: background 0.15s;
}
.archive-card:hover { background: var(--surface2); }

/* ===== Overall briefing ===== */
.overall-briefing {
    padding: 0 0 28px;
    border-bottom: 3px double var(--rule);
}
.overall-briefing h1 {
    font-size: 1.9em;
    line-height: 1.3;
    margin-bottom: 4px;
}
.briefing-time {
    color: var(--text3);
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.72em;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.executive-summary {
    font-size: 1.1em;
    line-height: 2;
    margin: 18px 0;
}

/* Info boxes */
.info-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 20px;
    border-top: 1px solid var(--border-light);
}
.info-box {
    padding: 18px 16px;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
.info-box:nth-child(2n) { border-right: none; }
.info-box h3 {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.68em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    color: var(--text2);
}
.info-box ul { padding-left: 16px; font-size: 0.9em; line-height: 1.8; }
.info-box li { margin-bottom: 3px; }
.info-box.watch h3 { color: var(--warning); }
.info-box.risk h3 { color: var(--danger); }
.info-box.opportunity h3 { color: var(--success); }

/* ===== Theme cards ===== */
.theme-card {
    padding: 22px 0;
    border-bottom: 1px solid var(--border-light);
}
.theme-card:last-child { border-bottom: none; }
.theme-card h3 {
    margin: 8px 0 6px;
    font-family: 'Times New Roman', 'Noto Serif KR', Georgia, serif;
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.4;
}
.theme-card h3 a { color: var(--text); text-decoration: none; }
.theme-card h3 a:hover { color: var(--accent); }
.theme-header {
    display: flex;
    gap: 10px;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.75em;
}
.theme-sources { color: var(--text3); }
.theme-brief p {
    margin: 5px 0;
    font-size: 0.92em;
    line-height: 1.9;
}
.theme-brief strong {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text2);
}

/* Importance badge */
.importance-badge {
    padding: 2px 8px;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.7em;
    font-weight: 700;
}
.imp-10, .imp-9 { background: rgba(191,54,38,0.1); color: var(--danger); }
.imp-8, .imp-7 { background: rgba(178,80,0,0.1); color: var(--warning); }
.imp-6, .imp-5 { background: var(--surface2); color: var(--text2); }
.imp-4, .imp-3, .imp-2, .imp-1 { background: var(--surface2); color: var(--text3); }

/* Theme detail */
.theme-detail h1 { margin: 18px 0 14px; font-size: 1.9em; line-height: 1.3; }
.theme-detail .analysis-section {
    margin-bottom: 0;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-light);
}
.theme-detail .analysis-section:last-of-type { border-bottom: none; }
.theme-detail .analysis-section h2 {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text2);
    margin-bottom: 8px;
}
.theme-detail .analysis-section p { line-height: 2; }
.key-facts-list li { margin-bottom: 8px; line-height: 1.8; }

/* ===== Stats bar ===== */
.stats-bar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 0;
    margin-top: 28px;
    border-top: 1px solid var(--border-light);
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.72em;
    color: var(--text3);
}
.stats-bar a { color: var(--text3); text-decoration: none; }
.stats-bar a:hover { color: var(--accent); }

/* Briefing history */
.briefing-history-card {
    padding: 22px 0;
    border-bottom: 1px solid var(--border-light);
}
.briefing-history-card h3 {
    margin: 6px 0 5px;
    font-family: 'Times New Roman', 'Noto Serif KR', Georgia, serif;
    font-weight: 700;
    font-size: 1.1em;
    line-height: 1.4;
}
.briefing-history-card p {
    color: var(--text2);
    font-size: 0.9em;
    line-height: 1.7;
}
.theme-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.subtitle {
    color: var(--text3);
    margin-bottom: 24px;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.82em;
}

/* Story */
.story-detail h1 { margin: 18px 0; }
.story-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.82em;
}
.status { font-weight: 600; }
.status-ongoing { color: var(--success); }
.status-closed { color: var(--text3); }
.story-card h3 { margin: 6px 0 4px; }
.story-card h3 a { color: var(--text); text-decoration: none; }
.story-card h3 a:hover { color: var(--accent); }
.story-link {
    display: block;
    text-align: center;
    color: var(--accent);
    text-decoration: none;
    padding: 14px;
    border: 1px solid var(--border);
    margin-top: 14px;
}
.story-link:hover { background: var(--surface2); }

/* Timeline */
.timeline { margin-top: 28px; }
.timeline-entry {
    display: flex;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.timeline-date {
    color: var(--text3);
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.8em;
    min-width: 90px;
    flex-shrink: 0;
}
.timeline-source {
    color: var(--accent);
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.8em;
    font-weight: 600;
}

/* ===== Empty states ===== */
.empty {
    color: var(--text3);
    padding: 48px 24px;
    text-align: center;
    font-style: italic;
}
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state h2 { color: var(--text2); margin-bottom: 10px; }
.empty-state p { color: var(--text3); margin-bottom: 6px; }
.empty-state button {
    margin-top: 18px;
    padding: 10px 28px;
    background: var(--text);
    color: var(--bg);
    border: none;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.88em;
}

/* ===== Daily summary ===== */
.daily-summary { border-bottom: 1px solid var(--border-light); padding: 18px 0; margin-bottom: 14px; }
.daily-summary h2 {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text2);
}
.daily-summary .headline {
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 1.15em;
    font-weight: 700;
    margin: 6px 0;
}
.daily-summary ul { padding-left: 16px; line-height: 1.8; }

/* Key facts */
.key-facts { margin-top: 14px; }
.key-facts h4 {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text2);
    margin-bottom: 6px;
}
.key-facts ul { padding-left: 16px; line-height: 1.8; }

/* ===== Footer ===== */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 5px 24px;
    transition: background 0.3s;
}
.status-bar {
    display: flex;
    gap: 14px;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.7em;
    color: var(--text3);
    max-width: 680px;
    margin: 0 auto;
}
.status-bar button {
    padding: 3px 12px;
    font-size: 0.85em;
    background: var(--text2);
    color: var(--bg);
}

main { padding-bottom: 46px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    body { font-size: 15px; }
    .container { padding: 20px 16px; }
    .masthead { padding: 18px 16px 14px; }
    .masthead-left { left: 16px; }
    .masthead-right { right: 16px; }
    .logo-main { font-size: 1.2em; letter-spacing: 2px; }
    .header-search { padding: 4px 8px; }
    .header-search input { width: 40px; font-size: 0.72em; }
    .header-search input:focus { width: 72px; }
    .theme-btn { width: 16px; height: 16px; }
    .theme-switcher { gap: 3px; }

    /* Nav stays horizontal, scrollable on mobile */
    .nav-links {
        padding: 0 16px;
        gap: 0;
    }
    .nav-links a {
        padding: 8px 10px;
        font-size: 0.72em;
    }

    .theme-btn { width: 18px; height: 18px; }
    .search-icon { width: 12px; height: 12px; }

    .stats-grid { flex-direction: row; }
    .stat-number { font-size: 1.4em; }
    .stat-label { font-size: 0.62em; }

    .cat-grid { flex-wrap: wrap; }
    .cat-card { min-width: 48%; flex: none; }

    h1 { font-size: 1.4em; }
    .overall-briefing h1 { font-size: 1.5em; }
    .article-detail h1 { font-size: 1.4em; }
    .theme-detail h1 { font-size: 1.4em; }
    .executive-summary { font-size: 1em; }
    .theme-card h3 { font-size: 1.05em; }

    .info-columns { grid-template-columns: 1fr; }
    .info-box { border-right: none; }

    .stats-bar { font-size: 0.68em; gap: 8px; }
    .archive-grid { grid-template-columns: repeat(3, 1fr); }

    footer { padding: 5px 16px; }
}

@media (max-width: 400px) {
    .cat-card { min-width: 100%; }
    .stats-grid { flex-direction: column; }
    .stat-card { border-right: none; border-bottom: 1px solid var(--border); }
    .stat-card:last-child { border-bottom: none; }
    .archive-grid { grid-template-columns: repeat(2, 1fr); }
}
