/* =========================================================
   CekFakta — design tokens
   Warna wajib dari dokumen requirement:
     Merah #D85A30 · Merah Tua #791F1F · Oranye Muda #E8A583 · Kuning #FAC775
   Font wajib: Poppins (heading) / Inter (body)
   Gaya: minimalis, hangat, ramah, navigasi terpusat tanpa sidebar (mirip Notion)
   ========================================================= */

:root {
    --merah: #2563EB;
    --merah-tua: #123B72;
    --oranye-muda: #DCEBFF;
    --kuning: #F4C542;
    --putih: #FFFFFF;

    /* Netral hangat turunan dari palet di atas, supaya konsisten */
    --ink: #172B4D;
    --ink-soft: #5B6B82;
    --paper: #F8FBFF;
    --surface: #FFFFFF;
    --line: #DCE6F2;
    --line-strong: #B8CCE3;

    --success: #3F7A4E;
    --success-bg: #EAF5EC;
    --danger: #B23A2E;
    --danger-bg: #FCEAE7;

    --radius-s: 8px;
    --radius-m: 14px;
    --radius-l: 22px;
    --shadow-card: 0 1px 2px rgba(43, 23, 16, 0.06), 0 8px 24px -12px rgba(121, 31, 31, 0.18);
    --max-width: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@keyframes page-enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes card-enter {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    animation: page-enter 0.45s ease-out both;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.25;
    color: var(--merah-tua);
    margin: 0 0 0.5em;
}

p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--merah); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Navbar (terpusat, tanpa sidebar) ---------- */
.site-nav {
    background: var(--putih);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--merah-tua);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--merah), var(--merah-tua));
    color: var(--putih);
    font-size: 0.8rem;
    font-weight: 700;
}
.brand-mark.small { width: 24px; height: 24px; font-size: 0.65rem; border-radius: 7px; }

.nav-links {
    display: flex;
    gap: 2px;
    align-items: center;
    white-space: nowrap;
}
.nav-links a {
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 8px 9px;
    border-radius: var(--radius-s);
    white-space: nowrap;
}
.nav-links a:hover { background: var(--oranye-muda); color: var(--merah-tua); text-decoration: none; }
.nav-links a.active { background: var(--merah-tua); color: var(--putih); }
.admin-nav-links { margin-right: auto; }

.nav-auth { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.nav-username { font-size: 0.88rem; color: var(--ink-soft); white-space: nowrap; }
.nav-admin-link { font-size: 0.78rem; font-weight: 700; padding: 7px 10px; border-radius: var(--radius-s); background: var(--kuning); color: var(--merah-tua); white-space: nowrap; }
.nav-admin-link { box-shadow: 0 0 0 3px rgba(244, 197, 66, 0.18); }
.nav-burger { display: none; background: none; border: none; font-size: 1.4rem; color: var(--merah-tua); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: var(--radius-s);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--merah); color: var(--putih); }
.btn-primary:hover { background: var(--merah-tua); }
.btn-primary:hover, .btn-ghost:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(121, 31, 31, 0.14); }
.btn-ghost { background: transparent; color: var(--merah-tua); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--oranye-muda); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-danger { background: var(--danger); color: var(--putih); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Cards & surfaces ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 24px;
    box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 16px; }

/* ---------- Hero (landing) ---------- */
.hero {
    padding: 72px 0 54px;
    background: radial-gradient(circle at 78% 18%, rgba(244, 197, 66, 0.22), transparent 25%), linear-gradient(135deg, #F8FBFF 0%, #EAF3FF 100%);
    border-bottom: 1px solid var(--line);
}
.hero-inner {
    display: grid;
    gap: 28px;
    align-items: center;
}
.hero-eyebrow { color: var(--merah); font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--merah); font: 700 0.76rem 'Poppins', sans-serif; letter-spacing: 0.12em; margin-bottom: 12px; }
.hero-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--merah); box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 4.1rem); max-width: 12ch; letter-spacing: -0.02em; }
.hero h1 em { color: var(--merah); font-style: normal; }
.hero-sub { color: var(--ink-soft); font-size: 1.05rem; max-width: 52ch; }

.check-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: 22px;
    box-shadow: var(--shadow-card);
    margin-top: 22px;
}
.check-form textarea {
    width: 100%;
    min-height: 96px;
    padding: 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-s);
    font-family: inherit;
    font-size: 0.98rem;
    resize: vertical;
}
.check-form textarea:focus, input:focus, select:focus { outline: 2px solid var(--merah); outline-offset: 1px; }
.check-form-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; align-items: center; }
.hero-form-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.hero-form-heading span { color: var(--ink-soft); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; }
.hero-form-note { color: var(--ink-soft); font-size: 0.85rem; }
.home-section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; }
.home-section-heading h2 { margin-bottom: 0; }
.home-section-heading > span { color: var(--ink-soft); font-size: 0.82rem; }
.check-page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius-l); background: linear-gradient(120deg, #EAF3FF 0%, var(--surface) 68%); }
.check-page-heading h1 { margin-bottom: 6px; }
.check-page-heading .hero-sub { margin-bottom: 0; }
.check-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #CDE8D3; border-radius: 99px; background: var(--success-bg); color: var(--success); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.check-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(63, 122, 78, 0.12); }
.check-workspace { display: grid; gap: 16px; align-items: start; }
.check-workspace .check-form { margin-top: 0 !important; border-color: var(--line-strong); }
.check-workspace .check-form textarea { min-height: 150px; background: #FCFDFF; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.check-workspace .check-form textarea:focus { border-color: var(--merah); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
.form-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.form-title-row h2 { display: inline; margin: 0 0 0 8px; font-size: 1.15rem; }
.form-step { color: var(--merah); font-family: 'Poppins', sans-serif; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; }
.input-badge { padding: 5px 8px; background: #FFF3DC; color: #8A5A00; border-radius: var(--radius-s); font-size: 0.72rem; font-weight: 600; }
.upload-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--ink-soft); font-size: 0.78rem; }
.upload-divider::before, .upload-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.upload-box { display: flex; align-items: center; gap: 12px; position: relative; padding: 15px; border: 1px dashed var(--line-strong); border-radius: var(--radius-s); background: var(--paper); transition: background 0.18s ease, border-color 0.18s ease; }
.upload-box:hover { border-color: var(--merah); background: #F1F7FF; }
.upload-box label { display: block; color: var(--merah-tua); font-weight: 600; cursor: pointer; }
.upload-box small { display: block; color: var(--ink-soft); font-size: 0.76rem; }
.upload-box input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-box input:disabled { cursor: not-allowed; }
.upload-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-s); background: var(--oranye-muda); color: var(--merah-tua); font-size: 1.35rem; line-height: 1; }
.form-note { color: var(--ink-soft); font-size: 0.78rem; }
.check-guide { padding: 24px; border-radius: var(--radius-m); background: var(--merah-tua); color: var(--putih); box-shadow: var(--shadow-card); }
.check-guide { position: relative; overflow: hidden; }
.check-guide::after { content: 'CF'; position: absolute; right: -12px; bottom: -28px; color: rgba(244, 197, 66, 0.12); font: 700 7rem 'Poppins', sans-serif; line-height: 1; transform: rotate(-12deg); pointer-events: none; }
.check-guide h2 { color: var(--putih); font-size: 1.25rem; margin-bottom: 8px; }
.check-guide > p:not(.section-kicker) { color: #F6DCD0; font-size: 0.88rem; }
.check-guide .section-kicker { color: var(--kuning); }
.guide-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid rgba(255,255,255,0.18); }
.guide-item > span { color: var(--kuning); font: 700 0.78rem 'Poppins', sans-serif; }
.guide-item strong, .guide-item small { display: block; }
.guide-item small { margin-top: 2px; color: #F6DCD0; font-size: 0.76rem; }
.guide-link { display: inline-block; margin-top: 10px; color: var(--kuning); font-weight: 600; font-size: 0.85rem; }
.guide-link:hover { color: var(--putih); }
.prebunking-section { margin-top: 42px; }
.prebunking-section h2 { margin-bottom: 4px; font-size: 1.35rem; }
.section-kicker { color: #0F766E; font-size: 0.75rem; letter-spacing: 0.2em; font-weight: 700; margin: 0 0 6px; }
.section-more { color: var(--ink); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.section-more:hover { color: var(--merah); }
.reference-intro { color: var(--ink-soft); max-width: 68ch; }
.prebunking-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 18px; }
.prebunking-card { display: block; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); color: inherit; }
.prebunking-card:hover { border-color: var(--merah); text-decoration: none; }
.prebunking-card { animation: card-enter 0.5s ease-out both; }
.prebunking-card:nth-child(2) { animation-delay: 0.08s; }
.prebunking-card:nth-child(3) { animation-delay: 0.16s; }
.prebunking-card img { transition: transform 0.35s ease; }
.prebunking-card:hover img { transform: scale(1.04); }
.prebunking-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.prebunking-card-body { padding: 16px; }
.prebunking-card-body h3 { margin: 7px 0 12px; font-size: 1.08rem; line-height: 1.35; }
.prebunking-card-body time { color: var(--ink-soft); font-size: 0.82rem; }
.article-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.article-filter input, .article-filter select { width: auto; flex: 1; min-width: 150px; }
.article-detail { max-width: 820px; }
.article-detail-card { margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-card); }
.article-detail-card > img { width: 100%; max-height: 380px; object-fit: cover; }
.article-detail-body { padding: 28px; }
.article-detail-body h1 { margin: 8px 0; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.article-detail-date { color: var(--ink-soft); font-size: 0.82rem; }
.article-lead { margin: 22px 0; font-size: 1.08rem; font-weight: 600; color: var(--merah-tua); }
.article-content { margin-bottom: 24px; color: var(--ink); line-height: 1.8; }
.fact-check-card { display: block; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); color: inherit; transition: border-color 0.15s ease, transform 0.15s ease; }
.fact-check-card:hover { border-color: var(--merah); text-decoration: none; transform: translateY(-2px); }
.fact-check-card h3 { margin: 6px 0; font-size: 1.05rem; }
.fact-check-card h3 span { color: var(--merah); font-size: 0.95rem; }
.fact-check-card p { color: var(--ink-soft); font-size: 0.88rem; margin: 0; }

/* ---------- Steps (Cara Kerja - urutan asli, layak diberi nomor) ---------- */
.steps {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
    margin-top: 28px;
}
.step {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
}
.step-num {
    flex: none;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--kuning);
    color: var(--merah-tua);
    display: grid; place-items: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}
.step h3 { margin-bottom: 4px; font-size: 1.02rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Quick access section ---------- */
.quick-links { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 16px; }
.quick-link-card {
    position: relative; min-height: 188px; background: var(--merah-tua); border-radius: var(--radius-m); padding: 22px; color: var(--putih); overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.quick-link-card:hover { transform: translateY(-4px); box-shadow: 0 14px 24px rgba(18, 59, 114, 0.2); text-decoration: none; }
.quick-link-literacy { background: var(--kuning); color: var(--merah-tua); }
.quick-link-number { font: 700 0.75rem 'Poppins', sans-serif; opacity: 0.7; }
.quick-link-icon { position: absolute; top: 18px; right: 20px; font-size: 1.5rem; }
.quick-link-card h3 { margin: 28px 0 6px; }
.quick-link-card p { color: inherit; opacity: 0.82; font-size: 0.92rem; max-width: 28ch; }
.quick-link-card strong { position: absolute; bottom: 20px; left: 22px; font-size: 0.78rem; }

/* ---------- Badges (label kredibilitas) ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-fakta { background: var(--success-bg); color: var(--success); }
.badge-hoaks { background: var(--danger-bg); color: var(--danger); }
.badge-konteks { background: #FFF3DC; color: #8A5A00; }
.badge-unverified { background: #EFEFEF; color: #5A5A5A; }

/* ---------- Skor kredibilitas ---------- */
.score-ring {
    width: 96px; height: 96px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--putih);
    background: conic-gradient(var(--merah) calc(var(--score,0) * 1%), var(--line) 0);
    position: relative;
    flex: none;
}
.score-ring::after {
    content: attr(data-score);
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: var(--merah-tua);
    display: grid; place-items: center;
}

.result-header { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.result-sources { list-style: none; padding: 0; margin: 12px 0 0; }
.result-sources li { padding: 10px 0; border-top: 1px solid var(--line); }
.result-sources li:first-child { border-top: none; }

.disclaimer {
    background: var(--kuning);
    color: var(--merah-tua);
    padding: 12px 16px;
    border-radius: var(--radius-s);
    font-size: 0.88rem;
    margin: 16px 0;
}

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--merah-tua); }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-s);
    font-family: inherit;
    font-size: 0.96rem;
    background: var(--putih);
    color: var(--ink);
}
.form-group { margin-bottom: 16px; }
.form-narrow { max-width: 420px; margin: 40px auto; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-s); margin: 16px 0; font-size: 0.92rem; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); }

/* ---------- Komunitas ---------- */
.topic-list { list-style: none; padding: 0; margin: 0; }
.topic-item {
    display: block;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: var(--surface);
    margin-bottom: 12px;
    color: var(--ink);
}
.topic-item:hover { border-color: var(--merah); text-decoration: none; }
.topic-item h3 { margin-bottom: 6px; font-size: 1.02rem; }
.topic-meta { font-size: 0.82rem; color: var(--ink-soft); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.filter-bar select, .filter-bar input[type=search] { width: auto; flex: 1; min-width: 160px; }

.comment { padding: 14px 0; border-top: 1px solid var(--line); }
.comment:first-child { border-top: none; }
.comment-meta { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 4px; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--oranye-muda); color: var(--merah-tua);
    display: inline-grid; place-items: center; font-weight: 700; font-size: 0.85rem;
    margin-right: 8px; vertical-align: middle;
}

/* ---------- Literasi ---------- */
.literacy-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius-l); background: linear-gradient(120deg, #EAF3FF 0%, var(--surface) 65%); overflow: hidden; }
.literacy-hero h1 { margin-bottom: 6px; }
.literacy-mark { display: flex; align-items: center; gap: 9px; flex: none; transform: rotate(5deg); }
.literacy-mark span { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--merah-tua); color: var(--kuning); font: 700 1.35rem 'Poppins', sans-serif; box-shadow: 8px 8px 0 var(--kuning); }
.literacy-mark small { color: var(--merah-tua); font: 700 0.72rem 'Poppins', sans-serif; line-height: 1.15; }
.literacy-check-card { padding: 24px; border-radius: var(--radius-l); background: var(--merah-tua); color: var(--putih); box-shadow: var(--shadow-card); }
.literacy-card-heading, .literacy-articles-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.literacy-card-heading h2, .literacy-articles-heading h2 { margin-bottom: 0; }
.literacy-check-card h2 { color: var(--putih); font-size: 1.35rem; }
.literacy-check-card .hero-eyebrow { color: var(--kuning); margin-bottom: 4px; }
.check-count { padding: 6px 9px; border: 1px solid rgba(255,255,255,0.25); border-radius: 99px; color: #F6DCD0; font-size: 0.75rem; }
.literacy-check-card .checklist { display: grid; gap: 0 22px; grid-template-columns: 1fr; margin-bottom: 0; }
.literacy-check-card .checklist li { border-top-color: rgba(255,255,255,0.18); color: #F6DCD0; }
.literacy-check-card .checklist li::before { color: var(--kuning); }
.literacy-articles-heading { margin-top: 34px; align-items: end; }
.literacy-articles-heading h2 { font-size: 1.45rem; }
.literacy-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.literacy-grid { margin-top: 0; }
.article-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 18px; }
.article-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.article-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.article-cat { font-size: 0.75rem; font-weight: 600; color: var(--merah); }
.article-card h3 { font-size: 1rem; margin: 6px 0; }
.article-card .meta { font-size: 0.8rem; color: var(--ink-soft); }
.checklist { list-style: none; padding: 0; margin: 16px 0; }
.checklist li { padding: 10px 0 10px 30px; position: relative; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: none; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--merah); font-weight: 700; }

/* ---------- Riwayat ---------- */
.history-item { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.history-item .snippet { color: var(--ink-soft); font-size: 0.9rem; margin: 4px 0 0; }

/* ---------- Tables (admin) ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--merah-tua); font-family: 'Poppins', sans-serif; font-size: 0.82rem; }
.stat-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; }
.stat-card .num { font-family: 'Poppins', sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--merah-tua); }
.stat-card .label { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Dashboard pengguna ---------- */
.dashboard-heading, .section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.dashboard-heading { margin-bottom: 24px; }
.dashboard-heading h1, .section-heading h2 { margin-bottom: 4px; }
.section-heading h2 { font-size: 1.15rem; }
.dashboard-grid { display: grid; gap: 16px; }
.label-chart { display: grid; gap: 18px; margin-top: 18px; }
.chart-label { display: flex; justify-content: space-between; gap: 12px; font-size: 0.85rem; color: var(--ink-soft); }
.chart-label strong { color: var(--ink); }
.chart-track { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 7px; }
.chart-bar { display: block; height: 100%; min-width: 10px; border-radius: inherit; }
.chart-bar.badge-fakta { background: var(--success); }
.chart-bar.badge-hoaks { background: var(--danger); }
.chart-bar.badge-konteks { background: #C58A18; }
.chart-bar.badge-unverified { background: #777; }
.dashboard-list { display: grid; gap: 2px; margin-top: 4px; }
.dashboard-list-item { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); color: inherit; }
.dashboard-list-item:last-child { border-bottom: none; }
.dashboard-list-item:hover { text-decoration: none; }
.dashboard-list-title { font-weight: 600; color: var(--ink); }
.dashboard-list-meta { font-size: 0.78rem; color: var(--ink-soft); }
.empty-state.compact { padding: 24px 8px; }
.score-note { color: var(--merah); font-size: 0.82rem; margin: 8px 0 0; font-weight: 600; }
.profile-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.profile-avatar { width: 48px; height: 48px; font-size: 1.1rem; }
.notification-list { display: grid; gap: 8px; margin-top: 18px; }
.notification-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; color: inherit; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.notification-item:hover { text-decoration: none; border-color: var(--line-strong); }
.notification-item.unread { background: #FFF7F1; border-color: var(--oranye-muda); }
.notification-item p { margin: 0 0 3px; }
.notification-dot { flex: none; width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: var(--line-strong); }
.notification-item.unread .notification-dot { background: var(--merah); }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0; }
.pagination a { min-width: 34px; padding: 6px 9px; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--radius-s); color: var(--merah-tua); }
.pagination a:hover, .pagination a.active { background: var(--merah-tua); color: var(--putih); text-decoration: none; }

/* ---------- Admin control room ---------- */
.admin-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px; border-radius: var(--radius-l); background: var(--merah-tua); color: var(--putih); box-shadow: var(--shadow-card); }
.admin-hero h1 { color: var(--putih); margin-bottom: 6px; }
.admin-hero p:not(.admin-kicker) { color: #DDEAFF; margin: 0; max-width: 58ch; }
.admin-kicker { color: var(--kuning); font: 700 0.72rem 'Poppins', sans-serif; letter-spacing: 0.16em; margin-bottom: 8px; }
.admin-badge { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,0.22); border-radius: var(--radius-m); background: rgba(255,255,255,0.09); }
.admin-badge > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--kuning); color: var(--merah-tua); font: 700 0.82rem 'Poppins', sans-serif; }
.admin-badge strong, .admin-badge small { display: block; }
.admin-badge strong { color: var(--kuning); font-size: 0.74rem; letter-spacing: 0.1em; }
.admin-badge small { color: #DDEAFF; font-size: 0.78rem; margin-top: 2px; }
.admin-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 14px 0 20px; }
.btn-admin { background: var(--merah-tua); border-color: var(--merah-tua); color: var(--putih); }
.btn-admin:hover { background: var(--merah); color: var(--putih); }
.admin-stats .stat-card { border-top: 3px solid var(--kuning); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0; background: var(--surface); }
.footer-inner p { margin: 0 0 4px; font-size: 0.88rem; color: var(--ink-soft); }
.footer-note { font-size: 0.8rem !important; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-soft); }

/* ---------- Responsive: tablet & desktop ---------- */
@media (min-width: 640px) {
    .steps { grid-template-columns: repeat(2, 1fr); }
    .quick-links { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .prebunking-grid { grid-template-columns: repeat(2, 1fr); }
    .literacy-check-card .checklist { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
    .steps { grid-template-columns: repeat(4, 1fr); }
    .article-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .dashboard-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
    .check-workspace { grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); }
}
@media (max-width: 780px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--putih);
        flex-direction: column;
        padding: 10px 20px 16px;
        border-bottom: 1px solid var(--line);
    }
    .nav-links.open { display: flex; }
    .nav-burger { display: block; }
    .nav-username { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Artikel Literasi bisa diklik (accordion) ---------- */
.article-card summary {
    cursor: pointer;
    list-style: none;
}
.article-card summary::-webkit-details-marker { display: none; }
.article-card summary::marker { content: ''; }
.expand-hint { color: var(--merah); font-weight: 600; }
.article-full {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 0.92rem;
}
.article-card[open] { border-color: var(--merah); }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}

.upload-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); }
.upload-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.upload-preview-info { flex: 1; min-width: 0; }
.upload-preview-info strong { display: block; font-size: 0.85rem; color: var(--merah-tua); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-preview-info small { color: var(--ink-soft); font-size: 0.75rem; }
.upload-preview-remove { border: none; background: none; font-size: 1.2rem; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 4px 8px; }
.upload-preview-remove:hover { color: var(--merah); }