/*
 * Portal Berita — gaya tunggal. Mobile-first, nuansa koran.
 * Palet & tipografi mengikuti spec §3 (Plan 3a).
 */

/* ---- Font self-host (variabel, subset latin) ---- */
@font-face {
	font-family: 'Lora';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/lora-latin.woff2') format('woff2');
}
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/inter-latin.woff2') format('woff2');
}

/* ---- Token ---- */
:root {
	--pb-bg: #FBFAF7;
	--pb-ink: #17171A;
	--pb-muted: #6B6B70;
	--pb-rule: #E2E0DA;
	--pb-accent: #7F1D1D;
	--pb-card: #fff;
	--pb-wrap: 1080px;
	--pb-read: 680px;
}

/* ---- Reset ringan ---- */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--pb-bg);
	color: var(--pb-ink);
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--pb-accent); }
h1, h2, h3, h4 { line-height: 1.18; }

.serif { font-family: Lora, Georgia, 'Times New Roman', serif; }
.wrap { max-width: var(--pb-wrap); margin: 0 auto; padding: 0 16px; }
.label {
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--pb-accent);
}
.muted { color: var(--pb-muted); font-size: .85rem; }

/* placeholder gambar */
.ph {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 3px;
	background:
		repeating-linear-gradient(45deg, #ece9e2, #ece9e2 10px, #e4e1d9 10px, #e4e1d9 20px);
}
figure img,
.card img,
.hl-main > a img,
.hl-item img,
.rel-item img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; }

/* aksesibilitas */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100;
	width: auto; height: auto; clip: auto;
	background: var(--pb-ink); color: #fff; padding: 8px 14px; border-radius: 3px;
}

/* ---- Header ---- */
header.site { border-bottom: 2px solid var(--pb-ink); background: var(--pb-bg); }
.topbar {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; max-width: var(--pb-wrap); margin: 0 auto; padding: 14px 16px;
}
.brand { font-weight: 700; font-size: 1.6rem; letter-spacing: -.01em; }
.brand a { color: inherit; }
.brand img { max-height: 44px; width: auto; }
.topbar__meta { display: flex; align-items: center; gap: 12px; }
.today { font-size: .78rem; color: var(--pb-muted); }
.pb-search {
	display: flex; align-items: center; gap: 8px;
	border: 1px solid var(--pb-rule); border-radius: 999px;
	padding: 5px 12px; background: #fff; color: var(--pb-muted);
}
.pb-search__field {
	border: 0; outline: 0; background: transparent; color: var(--pb-ink);
	font: inherit; font-size: .82rem; width: 150px;
}
nav.cats { border-bottom: 1px solid var(--pb-rule); }
nav.cats ul {
	display: flex; gap: 20px; list-style: none; margin: 0 auto; padding: 10px 16px;
	max-width: var(--pb-wrap); overflow-x: auto;
	font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
nav.cats li { white-space: nowrap; }

.terkini { background: var(--pb-ink); color: #fff; }
.terkini .wrap {
	display: flex; gap: 14px; align-items: center; padding: 8px 16px;
	font-size: .8rem; overflow-x: auto; white-space: nowrap;
}
.terkini b {
	color: #fff; background: var(--pb-accent); padding: 2px 8px; border-radius: 2px;
	letter-spacing: .06em; font-size: .7rem; flex: 0 0 auto;
}
.terkini a { color: #eceae6; border-right: 1px solid #3a3a3e; padding-right: 14px; }
.terkini a:last-child { border-right: 0; }
.terkini a:hover { color: #fff; }
.after-header:not(:empty) { padding: 14px 16px; }

/* ---- Beranda ---- */
.lead-grid { display: grid; grid-template-columns: 1fr; gap: 26px; margin: 26px 0; }
.hl-main__title { font-weight: 700; font-size: 1.9rem; margin: .5rem 0 .4rem; }
.hl-main .lead { color: #333; margin: .3rem 0 .5rem; }
.hl-list { display: grid; gap: 16px; }
.hl-item {
	display: grid; grid-template-columns: 96px 1fr; gap: 12px;
	border-top: 1px solid var(--pb-rule); padding-top: 14px;
}
.hl-item h3 { font-size: 1.02rem; margin: 4px 0 0; font-weight: 600; }
.block-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 14px; }
.block-title h2 { font-size: 1.15rem; margin: 0; }
.block-title::after { content: ""; flex: 1; height: 2px; background: var(--pb-ink); }
.cards { display: grid; grid-template-columns: 1fr; gap: 18px; }
.card__title { font-size: 1.05rem; margin: 8px 0 4px; font-weight: 600; }

/* ---- Single ---- */
.single-grid {
	display: grid; grid-template-columns: 1fr; gap: 34px;
	max-width: var(--pb-wrap); margin: 22px auto; padding: 0 16px;
}
.article-col { min-width: 0; }
.bc { font-size: .78rem; color: var(--pb-muted); margin: 0 0 10px; }
h1.title { font-weight: 700; font-size: 2rem; margin: .3rem 0 .5rem; }
.subj { font-size: 1.2rem; color: #2c2c30; line-height: 1.4; margin: .2rem 0 1rem; }
.byline {
	display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
	font-size: .82rem; color: var(--pb-muted);
	border-top: 1px solid var(--pb-rule); border-bottom: 1px solid var(--pb-rule);
	padding: 10px 0; margin-bottom: 18px;
}
.byline b { color: var(--pb-ink); font-weight: 600; }
figure.hero { margin: 0 0 18px; }
figure.hero figcaption { font-size: .78rem; color: var(--pb-muted); margin-top: 6px; }
.article-body { max-width: var(--pb-read); }
.article-body p { margin: 0 0 1.1rem; }
.article-body h2, .article-body h3 { font-family: Lora, Georgia, serif; margin: 1.6rem 0 .6rem; }
.article-body a { color: var(--pb-accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body img { border-radius: 3px; margin: .4rem 0; }

.perkara {
	border: 1px solid var(--pb-rule); border-left: 4px solid var(--pb-accent);
	background: #fff; border-radius: 4px; padding: 14px 16px; margin: 22px 0; max-width: var(--pb-read);
}
.perkara h4 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pb-accent); }
.perkara dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: .9rem; }
.perkara dt { color: var(--pb-muted); }
.perkara dd { margin: 0; }
.status-pill {
	display: inline-block; background: var(--pb-accent); color: #fff;
	font-size: .72rem; font-weight: 600; padding: 2px 9px; border-radius: 999px;
	text-transform: uppercase; letter-spacing: .04em;
}
.pb-praduga {
	background: #f4f1ea; border-radius: 4px; padding: 12px 14px;
	font-size: .86rem; color: #44423d; margin: 20px 0; max-width: var(--pb-read);
}
.in-article { margin: 22px 0; max-width: var(--pb-read); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.tags a { font-size: .78rem; border: 1px solid var(--pb-rule); border-radius: 999px; padding: 3px 11px; color: var(--pb-muted); }
.tags a:hover { color: var(--pb-accent); border-color: var(--pb-accent); }
.share { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.share a { font-size: .8rem; font-weight: 600; border: 1px solid var(--pb-ink); border-radius: 3px; padding: 6px 12px; }
.share a:hover { background: var(--pb-ink); color: #fff; }

/* ---- Rail ---- */
.rail { min-width: 0; display: grid; gap: 26px; align-content: start; }
.box-title {
	font-size: 1rem; font-weight: 700; margin: 0 0 10px;
	padding-bottom: 6px; border-bottom: 2px solid var(--pb-ink);
}
ol.pop { list-style: none; margin: 0; padding: 0; counter-reset: p; }
ol.pop li {
	counter-increment: p; display: grid; grid-template-columns: 28px 1fr; gap: 10px;
	padding: 10px 0; border-top: 1px solid var(--pb-rule);
}
ol.pop li:first-child { border-top: 0; }
ol.pop li::before { content: counter(p); font-family: Lora, serif; font-weight: 700; color: var(--pb-accent); font-size: 1.1rem; }
ol.pop a { font-family: Lora, serif; font-size: .95rem; line-height: 1.25; }
.rel-item { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--pb-rule); }
.rel-item:first-of-type { border-top: 0; }
.rel-item h4 { font-size: .92rem; margin: 0; font-weight: 600; }
.rel-item .muted { font-size: .75rem; }
.pb-widget:not(:last-child) { margin-bottom: 8px; }

/* ---- Arsip ---- */
.pb-archive { margin-top: 24px; margin-bottom: 40px; }
.archive-header { border-bottom: 2px solid var(--pb-ink); padding-bottom: 12px; margin-bottom: 22px; }
.archive-header h1 { font-size: 1.8rem; margin: 4px 0 0; }
.archive-header__desc { margin: 8px 0 0; }
.navigation.pagination { margin-top: 30px; }
.navigation .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.navigation .page-numbers {
	border: 1px solid var(--pb-rule); border-radius: 3px; padding: 6px 12px; font-size: .85rem;
}
.navigation .page-numbers.current { background: var(--pb-ink); color: #fff; border-color: var(--pb-ink); }

/* ---- Perkara & Penulis (Plan 3b) ---- */
.pb-perkara, .pb-author, .pb-page, .pb-indeks, .pb-404 { margin-top: 24px; margin-bottom: 40px; }
.perkara-head { border-bottom: 2px solid var(--pb-ink); padding-bottom: 14px; margin-bottom: 22px; }
.perkara-head h1 { font-size: 1.9rem; margin: 4px 0 0; }
.perkara-head__desc { margin: 8px 0 0; max-width: var(--pb-read); }
.perkara-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0 0; font-size: .9rem; max-width: var(--pb-read); }
.perkara-meta dt { color: var(--pb-muted); }
.perkara-meta dd { margin: 0; }
.author-head {
	display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start;
	border-bottom: 2px solid var(--pb-ink); padding-bottom: 20px; margin-bottom: 22px;
}
.author-head__avatar img { border-radius: 999px; display: block; }
.author-head__meta h1 { font-size: 1.7rem; margin: 0; }
.author-head__meta .label { margin: 6px 0 0; }
.author-head__bio { margin: 10px 0 0; max-width: var(--pb-read); color: #44423d; }
.author-head__link { margin: 8px 0 0; font-size: .85rem; }

/* ---- Indeks & Page ---- */
.pb-indeks h1, .pb-page h1 { font-size: 1.9rem; margin: 0 0 16px; }
.pb-indeks__picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 22px; }
.pb-indeks__picker select { padding: 6px 10px; border: 1px solid var(--pb-rule); border-radius: 3px; font: inherit; }
.pb-indeks__picker button { padding: 6px 14px; border: 1px solid var(--pb-ink); background: var(--pb-ink); color: #fff; border-radius: 3px; font: inherit; cursor: pointer; }
.pb-indeks__group { margin: 0 0 24px; }
.pb-indeks__date { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pb-accent); border-bottom: 1px solid var(--pb-rule); padding-bottom: 6px; margin: 0 0 12px; }
.pb-page .article-body { max-width: var(--pb-read); }
.pb-404 { text-align: center; padding: 40px 0; }
.pb-404 .search-form { justify-content: center; margin: 20px auto; }

/* ---- Footer ---- */
.site-footer { background: var(--pb-ink); color: #d8d6d0; margin-top: 48px; }
.footer-cols { display: grid; gap: 28px; grid-template-columns: 1fr; padding: 34px 16px; }
.footer-brand .brand { color: #fff; font-size: 1.4rem; }
.footer-brand .muted { color: #b6b4ae; max-width: 40ch; margin: .5rem 0 0; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.footer-col__title { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #8f8d87; margin-bottom: 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; line-height: 2; }
.footer-col a { color: #d8d6d0; }
.footer-col a:hover { color: #fff; }
.footer-col span { color: #8f8d87; }
.footer-bar { border-top: 1px solid #333; }
.footer-bar .wrap {
	display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between;
	padding: 14px 16px; font-size: .78rem; color: #8f8d87;
}

/* ---- Breakpoint ---- */
@media (max-width: 560px) {
	.today { display: none; }
	.pb-search__field { width: 110px; }
}
@media (min-width: 720px) {
	.brand { font-size: 1.9rem; }
	.lead-grid { grid-template-columns: 1.5fr 1fr; }
	.cards { grid-template-columns: repeat(3, 1fr); }
	.hl-main__title { font-size: 2.4rem; }
	h1.title { font-size: 2.6rem; }
	.archive-header h1 { font-size: 2.2rem; }
	.footer-cols { grid-template-columns: 1.6fr 1fr; }
}
@media (min-width: 960px) {
	.single-grid { grid-template-columns: minmax(0, 1fr) 320px; }
	.rail { position: sticky; top: 16px; }
}
