/* ==========================================================================
   Komponen isi artikel — bersama (Essendia & Newsata)
   Warna diambil dari variabel --w-* yang didefinisikan di tema.css
   ========================================================================== */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

svg.ikon {
	width: 1.05em; height: 1.05em; flex: none;
	fill: none; stroke: currentColor; stroke-width: 2;
	stroke-linecap: round; stroke-linejoin: round;
	vertical-align: -.15em;
}

/* ---------- Tipografi isi ---------- */
.entry-content { font-size: 1.0625rem; line-height: 1.8; color: var(--w-teks); overflow-wrap: break-word; }
.entry-content p { margin: 0 0 1.25em; }
.entry-content h2 {
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.65rem); font-weight: 750; line-height: 1.3;
	letter-spacing: -.012em; color: var(--w-judul); margin: 2.1em 0 .75em; scroll-margin-top: 96px;
}
.entry-content h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.4; color: var(--w-judul); margin: 1.7em 0 .55em; scroll-margin-top: 96px; }
.entry-content h4 { font-size: 1.05rem; font-weight: 700; color: var(--w-judul); margin: 1.5em 0 .5em; }
.entry-content a:not(.kartu-terkait):not(.label-kategori) {
	color: var(--w-tautan); text-decoration: underline; text-decoration-thickness: 1.5px;
	text-underline-offset: 3px; text-decoration-color: var(--w-tautan-garis);
	transition: color .15s, text-decoration-color .15s;
}
.entry-content a:not(.kartu-terkait):not(.label-kategori):hover { color: var(--w-tautan-hover); text-decoration-color: currentColor; }
.entry-content strong { color: var(--w-judul); font-weight: 700; }
.entry-content ul, .entry-content ol { margin: 0 0 1.4em; padding-left: 1.45em; }
.entry-content li { margin: .4em 0; padding-left: .2em; }
.entry-content li::marker { color: var(--w-utama); font-weight: 700; }
.entry-content li > ul, .entry-content li > ol { margin: .4em 0 .2em; }
.entry-content hr { border: 0; height: 1px; background: var(--w-garis); margin: 2.5em 0; }

/* ---------- Gambar ---------- */
.entry-content figure { margin: 2em 0; }
.entry-content figure img {
	display: block; width: 100%; height: auto;
	border-radius: var(--radius); border: 1px solid var(--w-garis); box-shadow: var(--bayangan-kecil);
}
.entry-content figcaption {
	text-align: center; font-size: .86rem; line-height: 1.5; color: var(--w-redup);
	margin: .75em auto 0; max-width: 46em;
}

/* ---------- Kutipan ---------- */
.entry-content blockquote {
	margin: 1.8em 0; padding: 1em 1.3em; border: 0; border-left: 4px solid var(--w-aksen);
	background: var(--w-aksen-lembut); border-radius: 0 var(--radius) var(--radius) 0;
	font-style: normal; color: var(--w-teks); font-size: 1rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

/* ---------- Kode ---------- */
.entry-content code, .entry-content kbd {
	font-family: var(--font-mono); font-size: .88em; padding: .15em .42em;
	background: var(--w-lembut); color: var(--w-kode-teks); border: 1px solid var(--w-garis); border-radius: 6px;
}
.entry-content pre {
	position: relative; margin: 1.6em 0; padding: 1.15em 1.25em; padding-right: 5.5em;
	background: var(--w-kode-latar); color: var(--w-kode-teks);
	border: 1px solid var(--w-garis); border-left: 4px solid var(--w-utama); border-radius: var(--radius-kecil);
	font-family: var(--font-mono); font-size: .9rem; line-height: 1.7; overflow-x: auto; white-space: pre;
	tab-size: 4;
}
.entry-content pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.tombol-salin-kode {
	position: absolute; top: .55em; right: .55em; display: inline-flex; align-items: center; gap: .35em;
	padding: .3em .7em; font: 600 .75rem/1.3 var(--font); color: var(--w-utama);
	background: #fff; border: 1px solid var(--w-garis); border-radius: 8px; cursor: pointer;
	opacity: .85; transition: opacity .15s, border-color .15s;
}
.tombol-salin-kode:hover, .tombol-salin-kode:focus-visible { opacity: 1; border-color: var(--w-utama); color: var(--w-utama); background: #fff; }
.tombol-salin-kode.tersalin { color: #15803d; border-color: #86efac; }

/* ---------- Tabel ---------- */
.tabel-gulir {
	margin: 1.8em 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
	background: #fff; border: 1px solid var(--w-garis); border-radius: var(--radius); box-shadow: var(--bayangan-kecil);
}
.tabel-gulir table { width: 100%; min-width: 520px; margin: 0; border: 0; border-collapse: collapse; font-size: .95rem; line-height: 1.6; }
.tabel-gulir th, .tabel-gulir td { border: 0; padding: .75em 1em; text-align: left; vertical-align: top; }
.tabel-gulir thead th, .tabel-gulir tr:first-child th {
	background: var(--w-lembut); color: var(--w-judul); font-weight: 700; border-bottom: 2px solid var(--w-garis-tegas);
}
.tabel-gulir td { border-top: 1px solid var(--w-garis); }
.tabel-gulir tbody tr:nth-child(even) td { background: var(--w-latar-baris); }

/* ---------- Kotak sorotan ---------- */
.entry-content .kotak {
	position: relative; margin: 1.7em 0; padding: 1em 1.25em 1em 3.3em; line-height: 1.7;
	border: 1px solid; border-radius: var(--radius); font-size: 1rem;
}
.entry-content .kotak::before {
	content: ""; position: absolute; left: 1.05em; top: 1.08em; width: 1.4em; height: 1.4em;
	background: currentColor; -webkit-mask: var(--ikon) center / contain no-repeat; mask: var(--ikon) center / contain no-repeat;
}
.entry-content .kotak strong:first-child { color: inherit; }
.kotak-tips { background: var(--w-aksen-lembut); border-color: var(--w-aksen-garis) !important; color: var(--w-teks); }
.kotak-tips::before { color: var(--w-aksen-tegas); --ikon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.2 1 2V17h6v-.3c0-.8.4-1.5 1-2A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }
.kotak-tips strong:first-child { color: var(--w-aksen-tegas) !important; }
.kotak-catatan, .kotak-contoh { background: var(--w-lembut); border-color: var(--w-garis-tegas) !important; color: var(--w-teks); }
.kotak-catatan::before, .kotak-contoh::before { color: var(--w-utama); --ikon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E"); }
.kotak-catatan strong:first-child, .kotak-contoh strong:first-child { color: var(--w-utama) !important; }
.kotak-penting, .kotak-peringatan { background: #fff7ed; border-color: #fed7aa !important; color: var(--w-teks); }
.kotak-penting::before, .kotak-peringatan::before { color: #c2410c; --ikon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.kotak-penting strong:first-child, .kotak-peringatan strong:first-child { color: #c2410c !important; }

/* ---------- Info baca ---------- */
.info-artikel { display: flex; flex-wrap: wrap; gap: .4em 1.3em; margin: 0 0 1.6em; font-size: .86rem; color: var(--w-redup); }
.info-artikel span { display: inline-flex; align-items: center; gap: .4em; }
.info-artikel .ikon { color: var(--w-utama); }

/* ---------- Daftar isi ---------- */
.daftar-isi { margin: 1.8em 0 2.2em; background: var(--w-lembut); border: 1px solid var(--w-garis); border-radius: var(--radius); }
.daftar-isi summary {
	display: flex; align-items: center; gap: .55em; padding: .95em 1.25em; cursor: pointer; list-style: none;
	font-weight: 700; color: var(--w-judul); user-select: none;
}
.daftar-isi summary::-webkit-details-marker { display: none; }
.daftar-isi summary .ikon { color: var(--w-utama); }
.daftar-isi summary::after {
	content: ""; margin-left: auto; width: .5em; height: .5em;
	border-right: 2px solid var(--w-redup); border-bottom: 2px solid var(--w-redup);
	transform: rotate(45deg) translateY(-2px); transition: transform .2s;
}
.daftar-isi details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.daftar-isi ol { margin: 0 !important; padding: .1em 1.25em 1.1em 2.75em !important; }
.daftar-isi li { margin: .3em 0; font-size: .95rem; line-height: 1.55; }
.entry-content .daftar-isi a { color: var(--w-teks) !important; text-decoration: none !important; }
.entry-content .daftar-isi a:hover { color: var(--w-utama) !important; }

/* ---------- FAQ ---------- */
.blok-faq { margin: 2.6em 0 0; }
.blok-faq > h2 { margin-top: 0; }
.faq-item {
	margin: .8em 0; padding: 1.05em 1.25em; background: #fff;
	border: 1px solid var(--w-garis); border-radius: var(--radius); box-shadow: var(--bayangan-kecil);
}
.entry-content .faq-item h3 { display: flex; gap: .65em; align-items: flex-start; margin: 0 0 .45em; font-size: 1.04rem; line-height: 1.45; }
.faq-item h3::before {
	content: "?"; flex: none; display: grid; place-items: center; width: 1.6em; height: 1.6em; margin-top: -.05em;
	border-radius: 50%; background: var(--w-lembut); color: var(--w-utama); font-size: .85em; font-weight: 800;
}
.faq-item p { margin-left: 2.3em; margin-bottom: .6em; font-size: .98rem; color: var(--w-teks); }
.faq-item > *:last-child { margin-bottom: 0; }

/* ---------- Bagikan ---------- */
.bagikan {
	display: flex; flex-wrap: wrap; align-items: center; gap: .5em;
	margin: 2.6em 0 0; padding-top: 1.5em; border-top: 1px solid var(--w-garis);
}
.bagikan-label { display: inline-flex; align-items: center; gap: .4em; margin-right: .3em; font-weight: 700; font-size: .95rem; color: var(--w-judul); }
.entry-content .bagikan a, .bagikan button {
	display: inline-flex; align-items: center; gap: .45em; padding: .5em .95em;
	font: 600 .86rem/1.2 var(--font); color: var(--w-teks) !important; text-decoration: none !important;
	background: #fff; border: 1px solid var(--w-garis); border-radius: 999px; cursor: pointer;
	transition: border-color .15s, background .15s, color .15s;
}
.bagikan a::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--warna, var(--w-utama)); }
.bagikan .b-wa { --warna: #25d366; } .bagikan .b-fb { --warna: #1877f2; }
.bagikan .b-tg { --warna: #229ed9; } .bagikan .b-x { --warna: #111827; }
.entry-content .bagikan a:hover, .bagikan button:hover { border-color: var(--warna, var(--w-utama)); background: var(--w-lembut); }
.bagikan .ikon { color: var(--w-utama); }
.bagikan button.tersalin { border-color: #86efac; background: #f0fdf4; }

/* ---------- Artikel terkait ---------- */
.terkait { margin: 2.8em 0 0; }
.entry-content .judul-terkait { margin: 0 0 1em; font-size: 1.3rem; }
.terkait-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.kartu-terkait {
	display: flex; flex-direction: column; overflow: hidden; text-decoration: none !important;
	background: #fff; border: 1px solid var(--w-garis); border-radius: var(--radius);
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.kartu-terkait:hover { transform: translateY(-3px); box-shadow: var(--bayangan); border-color: var(--w-garis-tegas); }
.kartu-terkait img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 0; border: 0; border-radius: 0; }
.kt-isi { display: block; padding: .8em 1em 1em; }
.kt-kat { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--w-utama); }
.kt-judul { display: block; margin-top: .35em; font-size: .93rem; font-weight: 700; line-height: 1.45; color: var(--w-judul); }
.kartu-terkait:hover .kt-judul { color: var(--w-utama); }
@media (max-width: 760px) {
	.terkait-grid { grid-template-columns: 1fr; gap: .75rem; }
	.kartu-terkait { flex-direction: row; align-items: center; }
	.kartu-terkait img { width: 40%; flex: none; aspect-ratio: 16 / 9; margin: 10px 0 10px 10px; border-radius: 8px; border: 1px solid var(--w-garis); }
	.kt-isi { padding: .7em .9em; }
	.kt-judul { font-size: .9rem; }
}

/* ---------- Remah roti ---------- */
.remah-roti { margin: 0 0 .9em; font-size: .84rem; line-height: 1.5; color: var(--w-redup); }
.remah-roti a { color: var(--w-redup); text-decoration: none; }
.remah-roti a:hover { color: var(--w-utama); }
.remah-roti .breadcrumb_last { color: var(--w-teks); font-weight: 600; }

/* ---------- Bilah progres & ke atas ---------- */
#bilah-baca {
	position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none;
	background: linear-gradient(90deg, var(--w-utama), var(--w-aksen)); transform: scaleX(0); transform-origin: 0 50%;
}
.admin-bar #bilah-baca { top: 32px; }
@media (max-width: 782px) { .admin-bar #bilah-baca { top: 46px; } }
#ke-atas {
	position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90; display: grid; place-items: center;
	width: 46px; height: 46px; padding: 0; border-radius: 50%; cursor: pointer;
	background: #fff; color: var(--w-utama); border: 1px solid var(--w-garis); box-shadow: var(--bayangan);
	opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s;
}
#ke-atas .ikon { width: 1.25em; height: 1.25em; }
#ke-atas.tampil { opacity: 1; visibility: visible; transform: none; }
#ke-atas:hover { background: var(--w-lembut); color: var(--w-utama); }

/* ---------- Label kategori ---------- */
.label-kategori {
	display: inline-block; margin-bottom: .7em; padding: .32em .75em;
	font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2;
	color: var(--w-utama) !important; background: var(--w-lembut); border-radius: 999px; text-decoration: none !important;
}
.label-kategori:hover { background: var(--w-utama); color: #fff !important; }

/* ---------- Fokus keyboard ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
	outline: 2px solid var(--w-utama); outline-offset: 2px;
}
