/* ============================================================
   CEKJURNAL DESIGN SYSTEM
   ------------------------------------------------------------
   Bahasa visual mengikuti polines.ac.id (tipografi, bentuk,
   jarak, komponen), dengan palet warna & logo milik CekJurnal.

   Mobile-first: aturan dasar berlaku untuk layar kecil, blok
   @media menambahkan penyesuaian ke atas. Tidak ada halaman
   mobile terpisah.

   Urutan pemuatan: SETELAH bootstrap, SEBELUM CSS halaman.
   ============================================================ */

/* ============================================================
   1. TOKEN
   ============================================================ */

:root {
  /* --- Warna merek CekJurnal --- */
  --cj-navy:        #003366;
  --cj-navy-deep:   #002244;
  --cj-blue:        #004080;
  --cj-blue-light:  #4A90E2;

  /* Biru tua khusus LATAR (ujung gradien navy). Sengaja tidak
     ikut ditimpa di mode gelap: --cj-blue di sana berubah jadi
     biru muda demi keterbacaan teks, dan kalau nilai itu dipakai
     sebagai latar, teks putih di atasnya tinggal 2,56:1. */
  --cj-navy-2:      #004080;
  --cj-gold:        #FDB515;
  --cj-gold-light:  #FFD700;

  /* Turunan untuk lapisan transparan */
  --cj-navy-rgb:    0, 51, 102;
  --cj-blue-rgb:    0, 64, 128;
  --cj-gold-rgb:    253, 181, 21;

  /* --- Netral (skala slate) --- */
  --cj-ink:         #1E293B;   /* teks utama   */
  --cj-ink-strong:  #0F172A;   /* judul        */
  --cj-muted:       #64748B;   /* teks sekunder*/
  --cj-muted-soft:  #94A3B8;
  --cj-line:        #E2E8F0;   /* garis/border */
  --cj-line-soft:   #F1F5F9;
  --cj-surface:     #FFFFFF;
  --cj-surface-alt: #F8FAFC;   /* latar halaman*/

  /* --- Status --- */
  --cj-success:     #059669;
  --cj-danger:      #DC2626;
  --cj-warning:     #D97706;
  --cj-warning-bg:  #FFFBEB;
  --cj-warning-text:#7A5C12;

  /* --- Tipografi --- */
  --cj-font-head: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cj-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* --- Bentuk --- */
  --cj-r-sm:   8px;
  --cj-r-md:   12px;
  --cj-r-lg:   14px;
  --cj-r-xl:   18px;
  --cj-r-pill: 9999px;

  /* --- Bayangan --- */
  --cj-shadow-sm:   0 1px 3px rgba(15, 23, 42, 0.06);
  --cj-shadow:      0 4px 16px rgba(15, 23, 42, 0.07);
  --cj-shadow-lg:   0 12px 32px rgba(15, 23, 42, 0.10);
  --cj-shadow-gold: 0 10px 40px -10px rgba(var(--cj-gold-rgb), 0.45);

  /* --- Alias lama ---
     CSS halaman warisan memakai nama --polines-*. Dipetakan ke
     token baru supaya semuanya ikut satu sumber warna. */
  --polines-navy:       var(--cj-navy);
  --polines-dark:       var(--cj-navy-deep);
  --polines-blue:       var(--cj-blue);
  --polines-light-blue: var(--cj-blue-light);
  --polines-gold:       var(--cj-gold);
  --polines-yellow:     var(--cj-gold-light);

  /* --- Tata letak --- */
  --cj-container: 1200px;
  --cj-gutter:    16px;
  --cj-header-h:  64px;
  --cj-tap:       44px;
}

@media (min-width: 768px) {
  :root { --cj-gutter: 24px; --cj-header-h: 73px; }
}

/* ============================================================
   1b. MODE GELAP
   ------------------------------------------------------------
   Hanya token yang ditimpa — seluruh komponen ikut otomatis.

   --cj-navy tetap navy asli karena dipakai sebagai LATAR
   (header hero, footer, tabel). Untuk TEKS berwarna merek
   dipakai --cj-brand-text, yang di mode gelap jadi biru muda
   supaya kontrasnya cukup di atas latar gelap.
   ============================================================ */

:root {
  --cj-brand-text: var(--cj-navy);
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  /* Permukaan */
  --cj-surface:     #141D2B;
  --cj-surface-alt: #0D1520;
  --cj-line:        #27354A;
  --cj-line-soft:   #1B2637;

  /* Teks */
  --cj-ink:         #E4EAF2;
  --cj-ink-strong:  #F6F9FC;
  --cj-muted:       #9BA9BC;
  --cj-muted-soft:  #6B7A8E;

  /* Merek: latar tetap navy, teks jadi biru muda */
  --cj-brand-text:  #7FB2E8;
  --cj-blue:        #6FA6E0;
  --cj-blue-light:  #8FC0F0;

  /* Status disesuaikan agar terbaca di latar gelap */
  --cj-success:     #34D399;
  --cj-danger:      #F87171;
  --cj-warning:     #FBBF24;
  --cj-warning-bg:  #241D08;
  --cj-warning-text:#F3D68B;

  /* Bayangan lebih pekat */
  --cj-shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.4);
  --cj-shadow:      0 4px 16px rgba(0, 0, 0, 0.45);
  --cj-shadow-lg:   0 12px 32px rgba(0, 0, 0, 0.55);
}

/* Mengikuti setelan sistem bila pengguna belum memilih sendiri */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --cj-surface:     #141D2B;
    --cj-surface-alt: #0D1520;
    --cj-line:        #27354A;
    --cj-line-soft:   #1B2637;
    --cj-ink:         #E4EAF2;
    --cj-ink-strong:  #F6F9FC;
    --cj-muted:       #9BA9BC;
    --cj-muted-soft:  #6B7A8E;
    --cj-brand-text:  #7FB2E8;
    --cj-blue:        #6FA6E0;
    --cj-blue-light:  #8FC0F0;
    --cj-success:     #34D399;
    --cj-danger:      #F87171;
    --cj-warning:     #FBBF24;
    --cj-warning-bg:  #241D08;
    --cj-warning-text:#F3D68B;
    --cj-shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.4);
    --cj-shadow:      0 4px 16px rgba(0, 0, 0, 0.45);
    --cj-shadow-lg:   0 12px 32px rgba(0, 0, 0, 0.55);
  }
}

/* ============================================================
   2. DASAR
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Lapisan dasar memakai :where() supaya spesifisitasnya NOL —
   kelas komponen mana pun bisa menimpanya tanpa perlu !important. */

body.cj {
  margin: 0;
  padding: 0;
  font-family: var(--cj-font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  color: var(--cj-ink);
  background: var(--cj-surface-alt);
  overflow-x: hidden;
}

:where(body.cj h1, body.cj h2, body.cj h3, body.cj h4, body.cj h5, body.cj h6) {
  margin: 0 0 0.5em;
  font-family: var(--cj-font-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--cj-ink-strong);
}

:where(body.cj p) { margin: 0 0 1em; }
:where(body.cj p:last-child) { margin-bottom: 0; }

/* Warna tautan berspesifisitas nol supaya mudah ditimpa komponen,
   tapi text-decoration ditegaskan dengan spesifisitas normal —
   garis bawah bawaan browser sempat lolos di navigasi & tombol. */
:where(body.cj a) {
  color: var(--cj-blue);
  transition: color 0.18s ease;
}

:where(body.cj a:hover) { color: var(--cj-brand-text); }

body.cj a { text-decoration: none; }

/* Garis bawah hanya untuk tautan di dalam teks berjalan.
   `li > a` sengaja TIDAK dipakai secara umum — daftar navigasi
   (footer, menu, kartu) juga memakai <li><a> dan ikut tergaris. */
body.cj p > a,
body.cj .cj-prose a,
body.cj .cj-explain__item li > a,
body.cj .predator-longform li > a,
body.cj .jg-block li > a,
body.cj .cj-collapse__body li > a { text-decoration: underline; text-underline-offset: 2px; }

body.cj .cj-btn,
body.cj .cj-btn:hover,
body.cj nav a,
body.cj nav a:hover,
body.cj .cj-footer a,
body.cj .cj-footer a:hover { text-decoration: none; }

:where(body.cj img, body.cj svg, body.cj video) { max-width: 100%; }
:where(body.cj img, body.cj video) { height: auto; }

:where(body.cj ul, body.cj ol) { margin: 0 0 1em; padding-left: 1.25rem; }
:where(body.cj li) { margin-bottom: 0.4em; }

:where(body.cj strong) { font-weight: 600; color: var(--cj-ink-strong); }

::selection { background: rgba(var(--cj-gold-rgb), 0.28); }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--cj-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   3. TATA LETAK
   ============================================================ */

.cj-container {
  width: 100%;
  max-width: var(--cj-container);
  margin-inline: auto;
  padding-inline: var(--cj-gutter);
}

.cj-section { padding: 48px 0; }
.cj-section--tight { padding: 32px 0; }
.cj-section--white { background: var(--cj-surface); }
.cj-section--alt { background: var(--cj-surface-alt); }

.cj-section--navy {
  background: linear-gradient(135deg, var(--cj-navy) 0%, var(--cj-navy-deep) 100%);
  color: rgba(255, 255, 255, 0.88);
}

.cj-section--navy h1,
.cj-section--navy h2,
.cj-section--navy h3 { color: #fff; }

@media (min-width: 768px) {
  .cj-section { padding: 72px 0; }
  .cj-section--tight { padding: 48px 0; }
}

/* Kepala section: eyebrow + judul + deskripsi */
.cj-head { margin-bottom: 28px; }
.cj-head--center { text-align: center; }
.cj-head--center .cj-head__desc { margin-inline: auto; }

.cj-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 15px;
  margin-bottom: 12px;
  border-radius: var(--cj-r-pill);
  background: rgba(var(--cj-navy-rgb), 0.08);
  color: var(--cj-brand-text);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.cj-eyebrow i { color: var(--cj-gold); }

.cj-section--navy .cj-eyebrow {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.cj-head__title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 4.2vw, 2.25rem);
}

.cj-head__title em {
  font-style: normal;
  color: var(--cj-blue);
}

.cj-section--navy .cj-head__title em { color: var(--cj-gold); }

.cj-head__desc {
  max-width: 62ch;
  margin: 0;
  color: var(--cj-muted);
  font-size: 15px;
}

.cj-section--navy .cj-head__desc { color: rgba(255, 255, 255, 0.75); }

/* Grid serbaguna */
.cj-grid { display: grid; gap: 16px; }
.cj-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cj-grid--auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

@media (min-width: 768px) {
  .cj-grid { gap: 22px; }
  .cj-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cj-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .cj-grid--3,
  .cj-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .cj-grid--2,
  .cj-grid--3,
  .cj-grid--4 { grid-template-columns: 1fr; }
}

/* ============================================================
   4. TOMBOL
   ============================================================ */

.cj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--cj-tap);
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--cj-r-lg);
  font-family: var(--cj-font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background-color 0.18s ease, color 0.18s ease;
}

.cj-btn:hover { transform: translateY(-2px); }
.cj-btn:active { transform: translateY(0); }

.cj-btn--gold {
  background: linear-gradient(135deg, var(--cj-gold) 0%, var(--cj-gold-light) 100%);
  color: var(--cj-navy);
  box-shadow: var(--cj-shadow-gold);
}

.cj-btn--gold:hover { color: var(--cj-navy-deep); }

.cj-btn--navy {
  background: var(--cj-navy);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(var(--cj-navy-rgb), 0.55);
}

.cj-btn--navy:hover { background: var(--cj-blue); color: #fff; }

.cj-btn--outline {
  background: transparent;
  border-color: var(--cj-line);
  color: var(--cj-brand-text);
}

.cj-btn--outline:hover {
  border-color: var(--cj-brand-text);
  background: rgba(var(--cj-navy-rgb), 0.04);
  color: var(--cj-brand-text);
}

/* Di atas latar gelap / foto */
.cj-btn--ghost {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  backdrop-filter: blur(6px);
}

.cj-btn--ghost:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }

.cj-btn--pill { border-radius: var(--cj-r-pill); }
.cj-btn--sm { min-height: 38px; padding: 8px 16px; font-size: 13.5px; }
.cj-btn--block { display: flex; width: 100%; }

/* ============================================================
   5. KARTU
   ============================================================ */

.cj-card {
  display: block;
  padding: 20px;
  background: var(--cj-surface);
  border: 1px solid var(--cj-line);
  border-radius: var(--cj-r-xl);
  box-shadow: var(--cj-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.cj-card:hover,
.cj-card--hover:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--cj-navy-rgb), 0.18);
  box-shadow: var(--cj-shadow-lg);
}

.cj-card__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--cj-brand-text);
}

.cj-card__desc {
  margin: 0;
  color: var(--cj-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* Ikon bulat di dalam kartu */
.cj-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: var(--cj-r-md);
  background: rgba(var(--cj-navy-rgb), 0.07);
  color: var(--cj-brand-text);
  font-size: 17px;
}

.cj-icon--gold {
  background: rgba(var(--cj-gold-rgb), 0.18);
  color: #8A6D1F;
}

.cj-section--navy .cj-icon {
  background: rgba(255, 255, 255, 0.12);
  color: var(--cj-gold);
}

/* Chip ikon bertema — dipakai kartu layanan & blok penjelasan */
.cj-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 13px;
  border-radius: var(--cj-r-md);
  background: rgba(var(--cj-navy-rgb), 0.07);
  color: var(--cj-brand-text);
  font-size: 17px;
}

.cj-ico--gold {
  background: rgba(var(--cj-gold-rgb), 0.18);
  color: #8A6D1F;
}

.cj-section--navy .cj-ico {
  background: rgba(255, 255, 255, 0.12);
  color: var(--cj-gold);
}

/* Ikon di dalam eyebrow & tombol */
.cj-eyebrow i { color: var(--cj-gold); font-size: 11.5px; }
.cj-section--navy .cj-eyebrow i,
.cj-hero .cj-eyebrow i { color: var(--cj-gold); }
.cj-btn i { font-size: 0.92em; }

/* Kartu statistik (di section navy) */
.cj-stat {
  padding: 22px 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--cj-r-xl);
  text-align: center;
}

.cj-stat__num {
  display: block;
  font-family: var(--cj-font-head);
  font-size: clamp(1.75rem, 6vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--cj-gold);
}

.cj-stat__label {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
}

.cj-stat__sub {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11.5px;
}

/* ============================================================
   6. BADGE & PILL
   ============================================================ */

.cj-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--cj-r-pill);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.cj-badge--navy  { background: rgba(var(--cj-navy-rgb), 0.09); color: var(--cj-brand-text); }
.cj-badge--gold  { background: rgba(var(--cj-gold-rgb), 0.20); color: #8A6D1F; }
.cj-badge--green { background: #ECFDF5; color: var(--cj-success); }
.cj-badge--red   { background: #FEF2F2; color: var(--cj-danger); }
.cj-badge--grey  { background: var(--cj-line-soft); color: var(--cj-muted); }

/* Peringkat SINTA — dipertahankan dari skema lama agar tetap dikenali */
.cj-sinta { color: #fff; }
.cj-sinta-1 { background: #8BC34A; color: #1B5E20; }
.cj-sinta-2 { background: #CDDC39; color: #33691E; }
.cj-sinta-3 { background: #FFEB3B; color: #5D4037; }
.cj-sinta-4 { background: #FFC107; color: #4E342E; }
.cj-sinta-5 { background: #FF9800; color: #3E2723; }
.cj-sinta-6 { background: #FF5722; color: #FFFFFF; }

/* ============================================================
   7. FORM
   ============================================================ */

.cj-field { margin-bottom: 16px; }

.cj-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cj-ink);
}

.cj-label i { margin-right: 5px; color: var(--cj-gold); }

.cj-input,
.cj-select,
.cj-textarea {
  display: block;
  width: 100%;
  min-height: var(--cj-tap);
  padding: 11px 14px;
  border: 1px solid var(--cj-line);
  border-radius: var(--cj-r-md);
  background: var(--cj-surface);
  color: var(--cj-ink);
  font-family: var(--cj-font-body);
  font-size: 16px;            /* 16px: cegah auto-zoom iOS */
  line-height: 1.4;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cj-textarea { min-height: 120px; resize: vertical; }

.cj-input:focus,
.cj-select:focus,
.cj-textarea:focus {
  outline: none;
  border-color: var(--cj-brand-text);
  box-shadow: 0 0 0 3px rgba(var(--cj-navy-rgb), 0.12);
}

.cj-input::placeholder,
.cj-textarea::placeholder { color: var(--cj-muted-soft); }

.cj-select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2364748B'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 15px;
}

/* Jaring pengaman: kontrol form apa pun (termasuk dari CSS lama)
   minimal 16px di layar kecil, supaya iOS Safari tidak nge-zoom
   saat kolom disentuh. */
@media (max-width: 767px) {
  body.cj input:not([type="checkbox"]):not([type="radio"]),
  body.cj select,
  body.cj textarea {
    font-size: 16px;
  }
}

/* ============================================================
   8. PANEL LIPAT (filter di mobile, terbuka di desktop)
   ============================================================ */

.cj-collapse {
  border: 1px solid var(--cj-line);
  border-radius: var(--cj-r-lg);
  background: var(--cj-surface);
}

.cj-collapse > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--cj-tap);
  padding: 12px 16px;
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--cj-brand-text);
}

.cj-collapse > summary::-webkit-details-marker { display: none; }

.cj-collapse > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-right: 3px;
  border-right: 2px solid var(--cj-muted);
  border-bottom: 2px solid var(--cj-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.22s ease;
}

.cj-collapse[open] > summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.cj-collapse__body { padding: 0 16px 16px; }

/* ============================================================
   PANEL FILTER + TATA LETAK DAFTAR
   ------------------------------------------------------------
   Dipakai bersama oleh /jurnal, /predator-daftar, dan
   /discontinued-scopus. Di bawah 992px panel jadi <details>
   yang bisa ditutup; di atasnya selalu terbuka dan lengket.
   ============================================================ */
.cj-listing {
  display: grid;
  gap: 16px;
  align-items: start;
}

@media (min-width: 992px) {
  .cj-listing {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
  }
}

/* ---------- Panel filter ---------- */
.cj-filter { margin-bottom: 0; }

.cj-filter__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: var(--cj-r-pill);
  background: var(--cj-gold);
  color: var(--cj-navy);
  font-size: 11px;
  font-weight: 700;
}

.cj-filter > summary { gap: 8px; }
.cj-filter > summary > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.cj-filter > summary i { color: var(--cj-gold); }

.cj-filter .cj-field:last-of-type { margin-bottom: 18px; }

.filter-buttons { margin-top: 4px; }

/* Di layar lebar panel selalu terbuka dan menempel saat digulir.
   max-height dulu memotong isi (Bahasa & Reset Filter tak terlihat);
   sekarang panel ikut menggulung bila memang lebih tinggi dari layar. */
@media (min-width: 992px) {
  .cj-filter {
    position: sticky;
    top: calc(var(--cj-header-h) + 16px);
  }

  .cj-filter > summary {
    cursor: default;
    border-bottom: 1px solid var(--cj-line);
    background: linear-gradient(135deg, var(--cj-navy) 0%, var(--cj-navy-2) 100%);
    color: #fff;
    border-radius: var(--cj-r-lg) var(--cj-r-lg) 0 0;
  }

  .cj-filter > summary i { color: var(--cj-gold); }
  .cj-filter > summary::after { display: none; }
}

/* Kepala panel filter di mobile bertint tipis.
   Dibatasi <=991px supaya tidak menimpa kepala navy versi desktop
   yang didefinisikan lebih dulu di blok @media (min-width: 992px). */
@media (max-width: 991px) {
  .cj-filter > summary {
    background: rgba(var(--cj-navy-rgb), 0.045);
    border-radius: var(--cj-r-lg) var(--cj-r-lg) 0 0;
  }

  .cj-filter[open] > summary { border-bottom: 1px solid var(--cj-line); }
}

/* Varian mendatar: panel duduk di atas hasil, bukan di sampingnya.
   Dipakai halaman yang hasilnya tabel lebar sehingga tidak menyisakan
   ruang untuk kolom samping. */
.cj-filter--bar { margin-bottom: 16px; }

@media (min-width: 640px) {
  .cj-filter--bar > .cj-collapse__body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
  }

  .cj-filter--bar .filter-buttons {
    display: flex;
    align-items: flex-end;
    margin-top: 0;
    margin-bottom: 16px;
  }
}

@media (min-width: 992px) {
  /* Tidak lengket: tidak ada kolom samping yang perlu diikuti */
  .cj-filter--bar { position: static; }

  .cj-filter--bar > .cj-collapse__body {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .cj-filter--bar .cj-field:last-of-type { margin-bottom: 16px; }
}

/* Baris ringkasan hasil di atas tabel/kartu */
.cj-results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(var(--cj-navy-rgb), 0.05) 0%, rgba(var(--cj-gold-rgb), 0.07) 100%);
  border: 1px solid rgba(var(--cj-navy-rgb), 0.1);
  border-left: 3px solid var(--cj-gold);
  border-radius: var(--cj-r-md);
}

.cj-results-bar__count {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--cj-brand-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.cj-results-bar__count strong { font-weight: 800; }

.cj-results-bar__sub {
  display: block;
  color: var(--cj-muted);
  font-size: 12px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .cj-results-bar__count { font-size: 14.5px; }
  .cj-results-bar__sub   { display: inline; margin-left: 6px; font-size: 13px; }
}

/* Panah dari border, bukan ikon font */
.cj-arrow {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

/* Catatan / peringatan ringkas */
.cj-note {
  padding: 13px 16px;
  border-left: 3px solid var(--cj-gold);
  border-radius: 0 var(--cj-r-md) var(--cj-r-md) 0;
  background: var(--cj-warning-bg);
  color: var(--cj-warning-text);
  font-size: 13.5px;
  line-height: 1.6;
}

.cj-note--info {
  border-left-color: var(--cj-blue);
  background: rgba(var(--cj-blue-rgb), 0.05);
  color: var(--cj-ink);
}

/* ============================================================
   9. TABEL RESPONSIF
   ------------------------------------------------------------
   Di layar kecil setiap baris menjadi kartu. Label kolom
   diambil dari atribut data-label pada <td>.
   ============================================================ */

.cj-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cj-table thead th {
  padding: 13px 14px;
  background: var(--cj-navy);
  color: #fff;
  font-family: var(--cj-font-head);
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.cj-table thead th:first-child { border-radius: var(--cj-r-md) 0 0 0; }
.cj-table thead th:last-child  { border-radius: 0 var(--cj-r-md) 0 0; }

.cj-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--cj-line);
  vertical-align: top;
}

.cj-table tbody tr:hover { background: var(--cj-surface-alt); }

@media (max-width: 767px) {
  .cj-table,
  .cj-table tbody { display: block; width: 100%; }

  .cj-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .cj-table tbody tr {
    display: block;
    padding: 13px 15px;
    margin-bottom: 12px;
    background: var(--cj-surface);
    border: 1px solid var(--cj-line);
    border-left: 3px solid var(--cj-gold);
    border-radius: var(--cj-r-lg);
    box-shadow: var(--cj-shadow-sm);
  }

  .cj-table tbody tr:hover { background: var(--cj-surface); }

  .cj-table tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--cj-line-soft);
    text-align: right;
    font-size: 13.5px;
  }

  .cj-table tbody td:last-child { border-bottom: none; padding-bottom: 0; }

  .cj-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 45%;
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cj-muted);
    padding-top: 2px;
  }

  /* Kolom judul jadi headline kartu */
  .cj-table tbody td[data-col="title"] {
    display: block;
    text-align: left;
    padding-top: 0;
    padding-bottom: 9px;
    font-size: 15px;
    font-weight: 600;
    color: var(--cj-brand-text);
  }

  .cj-table tbody td[data-col="title"]::before { display: none; }

  /* Nomor urut tidak informatif di mobile */
  .cj-table tbody td[data-col="no"] { display: none; }
}

/* ============================================================
   10. PAGINASI
   ============================================================ */

.cj-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.cj-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--cj-tap);
  min-height: var(--cj-tap);
  padding: 0 14px;
  border: 1px solid var(--cj-line);
  border-radius: var(--cj-r-md);
  background: var(--cj-surface);
  color: var(--cj-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.cj-page-btn:hover:not(:disabled) {
  border-color: var(--cj-brand-text);
  background: var(--cj-navy);
  color: #fff;
}

.cj-page-btn.is-active {
  border-color: var(--cj-brand-text);
  background: var(--cj-navy);
  color: #fff;
}

.cj-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.cj-page-info { color: var(--cj-muted); font-size: 13.5px; }

/* ============================================================
   11. UTILITAS
   ============================================================ */

.cj-center      { text-align: center; }
.cj-muted       { color: var(--cj-muted); }
.cj-small       { font-size: 13px; }
.cj-mb-0        { margin-bottom: 0 !important; }
.cj-mt-2        { margin-top: 16px; }
.cj-mt-3        { margin-top: 24px; }
.cj-stack       { display: flex; flex-direction: column; gap: 12px; }
.cj-row         { display: flex; flex-wrap: wrap; gap: 10px; }
.cj-row--center { justify-content: center; }
.cj-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ============================================================
   12. GERAK
   ============================================================ */

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