:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --ink: #16181d;
    --ink-soft: #5a6270;
    --line: #e4e7ec;
    --brand: #b91c1c;
    --brand-dark: #7f1414;
    --accent: #1d4ed8;
    --radius: 14px;
    --shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
    --shadow-lg: 0 12px 30px rgba(16, 24, 40, 0.12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* HEADER */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { font-size: 30px; }
.brand-name { font-family: 'Source Serif 4', Georgia, serif; font-weight: 700; font-size: 24px; display: block; color: var(--brand); letter-spacing: -0.02em; }
.brand-tagline { font-size: 12.5px; color: var(--ink-soft); display: block; }

.search-form { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.search-form input { border: 0; background: transparent; padding: 10px 16px; font-size: 14px; outline: none; width: 220px; }
.search-form button { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; font-size: 16px; }
.search-form.big { max-width: 560px; margin: 0 0 24px; border-radius: 12px; }
.search-form.big input { flex: 1; padding: 14px 18px; font-size: 16px; }
.search-form.big button { background: var(--brand); color: #fff; padding: 14px 26px; font-weight: 600; }

/* NAV */
.main-nav { background: var(--brand); }
.nav-inner { display: flex; gap: 4px; overflow-x: auto; }
.main-nav a { color: #fff; padding: 13px 16px; font-size: 14px; font-weight: 500; white-space: nowrap; opacity: .9; border-bottom: 3px solid transparent; transition: .15s; }
.main-nav a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.main-nav a.active { opacity: 1; border-bottom-color: #fff; font-weight: 600; }

/* MAIN */
.main-content { padding: 32px 0 48px; }
.section-heading { font-family: 'Source Serif 4', Georgia, serif; font-size: 24px; margin: 36px 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); display: inline-block; }

/* FEATURED */
.featured { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.featured-image { position: relative; min-height: 340px; background: #e9ecf1; display: block; }
.featured-image img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.featured-body { padding: 32px 32px 32px 0; display: flex; flex-direction: column; justify-content: center; }
.featured-body h1 { font-family: 'Source Serif 4', Georgia, serif; font-size: 30px; line-height: 1.2; margin: 14px 0; letter-spacing: -0.02em; }
.featured-body h1 a:hover { color: var(--brand); }
.featured-body p { color: var(--ink-soft); margin: 0 0 18px; }

/* CARD GRID */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-image { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg,#eef1f6,#e1e6ee); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { font-size: 42px; opacity: .4; }
.card-placeholder.big { font-size: 72px; }
.card-cat { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.95); color: var(--brand); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; }
.card-cat.solid { position: static; display: inline-block; background: var(--brand); color: #fff; margin-bottom: 6px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; line-height: 1.3; margin: 0 0 8px; }
.card-title a:hover { color: var(--brand); }
.card-summary { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--ink-soft); margin-top: auto; }
.card-source { font-weight: 600; color: var(--brand); }

/* PAGE HEAD */
.page-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-family: 'Source Serif 4', Georgia, serif; font-size: 28px; margin: 0; }
.result-count { color: var(--ink-soft); font-size: 14px; }

/* PAGINATION */
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 40px 0 8px; }
.pagination a { background: var(--surface); border: 1px solid var(--line); padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.page-info { color: var(--ink-soft); font-size: 14px; }

/* SINGLE ARTICLE */
.single { background: var(--surface); border-radius: var(--radius); padding: 36px clamp(20px,5vw,56px); box-shadow: var(--shadow); max-width: 820px; margin: 0 auto; }
.breadcrumb { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--brand); }
.single-title { font-family: 'Source Serif 4', Georgia, serif; font-size: clamp(28px,4vw,40px); line-height: 1.15; margin: 8px 0 16px; letter-spacing: -0.02em; }
.single-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--ink-soft); padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.single-source { font-weight: 700; color: var(--brand); }
.single-image { width: 100%; border-radius: 12px; margin-bottom: 24px; }
.single-body { font-size: 17.5px; line-height: 1.8; }
.single-body p { margin: 0 0 18px; }
.source-link { display: inline-block; margin-top: 24px; background: var(--brand); color: #fff; padding: 14px 24px; border-radius: 10px; font-weight: 600; }
.source-link:hover { background: var(--brand-dark); }
.prose h2 { font-family: 'Source Serif 4', Georgia, serif; margin-top: 28px; }
.source-list { padding-left: 18px; }
.source-list li { margin-bottom: 6px; }
.related { max-width: 1180px; margin: 48px auto 0; }

/* EMPTY / 404 */
.empty-state { text-align: center; padding: 80px 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty-state h1 { font-size: 72px; margin: 0; color: var(--brand); font-family: 'Source Serif 4', serif; }
.empty-state pre { background: var(--ink); color: #fff; display: inline-block; padding: 12px 20px; border-radius: 8px; margin-top: 12px; }
.btn { display: inline-block; margin-top: 18px; background: var(--brand); color: #fff; padding: 12px 24px; border-radius: 10px; font-weight: 600; }

/* SUBSCRIBE PAGE */
.subscribe-page { max-width: 620px; margin: 0 auto; text-align: center; background: var(--surface); border-radius: var(--radius); padding: 48px clamp(20px,5vw,56px); box-shadow: var(--shadow); }
.subscribe-icon { font-size: 56px; }
.subscribe-page h1 { font-family: 'Source Serif 4', Georgia, serif; font-size: 32px; margin: 12px 0 8px; }
.subscribe-lead { color: var(--ink-soft); margin: 0 auto 28px; max-width: 460px; }
.subscribe-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.subscribe-form input { flex: 1; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; outline: none; }
.subscribe-form input:focus { border-color: var(--brand); }
.subscribe-form button { background: var(--brand); color: #fff; border: 0; padding: 14px 26px; border-radius: 10px; font-weight: 600; font-size: 16px; cursor: pointer; }
.subscribe-form button:hover { background: var(--brand-dark); }
.subscribe-fineprint { color: var(--ink-soft); font-size: 12.5px; margin-top: 16px; }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 22px; font-weight: 500; }
.alert-ok { background: #e7f6ec; color: #1a7f40; border: 1px solid #b6e3c5; }
.alert-err { background: #fdecec; color: #b91c1c; border: 1px solid #f5c2c2; }

/* FOOTER SUBSCRIBE */
.footer-subscribe { background: rgba(255,255,255,.05); padding: 20px; border-radius: 12px; }
.footer-subscribe strong { font-family: 'Source Serif 4', serif; }
.footer-sub-form { display: flex; gap: 8px; margin-top: 12px; max-width: 420px; }
.footer-sub-form input { flex: 1; padding: 11px 14px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.95); border-radius: 8px; font-size: 14px; outline: none; }
.footer-sub-form button { background: var(--brand); color: #fff; border: 0; padding: 11px 18px; border-radius: 8px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.footer-sub-form button:hover { background: var(--brand-dark); }

/* FOOTER */
.site-footer { background: var(--ink); color: #c9ccd3; margin-top: 48px; padding: 40px 0; }
.footer-inner { display: grid; gap: 18px; }
.site-footer strong { color: #fff; font-family: 'Source Serif 4', serif; font-size: 18px; }
.site-footer p { margin: 6px 0 0; font-size: 14px; max-width: 640px; }
.footer-sources { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; align-items: center; }
.footer-sources a { color: #fff; opacity: .85; }
.footer-sources a:hover { opacity: 1; color: #ff8a8a; }
.footer-copy { font-size: 13px; opacity: .6; border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; }

/* RESPONSIVE */
@media (max-width: 860px) {
    .featured { grid-template-columns: 1fr; }
    .featured-image { min-height: 220px; position: relative; }
    .featured-image img { position: relative; }
    .featured-body { padding: 0 24px 28px; }
    .header-inner { flex-wrap: wrap; }
    .search-form input { width: 140px; }
}
