/* Chatera Blog — main stylesheet.
 * Kustom di luar theme.json (UI state, layout spesifik, dark override).
 */

/* ------------------------------------------------------------------
 * 0. Manual @font-face (fallback — guarantee font loading even jika
 *    theme.json fontFace generation belum ready).
 * ------------------------------------------------------------------ */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-variable.woff2") format("woff2-variations"),
	     url("../fonts/inter-variable.woff2") format("woff2");
}
/* Global font — Inter di seluruh tema (heading, body, UI). */
html, body,
h1, h2, h3, h4, h5, h6,
p, li, blockquote, figcaption, dl, dt, dd,
.wp-block-post-title,
.wp-block-post-content,
.wp-block-post-excerpt,
.chatera-header,
.chatera-footer,
.chatera-btn,
.chatera-nav,
.section-title,
.chatera-card__title,
.chatera-hero__excerpt,
.chatera-single__dek {
	font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ------------------------------------------------------------------
 * 1. Root + reset
 * ------------------------------------------------------------------ */
:root {
	color-scheme: light dark;
	--chatera-radius: 0.5rem;
	--chatera-radius-lg: 0.75rem;
	--chatera-transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
	--chatera-header-height: 60px;
	/* Heading color token — stronger contrast than body for visual hierarchy */
	--chatera-heading: #000000;
}
html[data-theme="light"] { --chatera-heading: #000000; }
html[data-theme="dark"]  { --chatera-heading: #F4F4F5; }

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

/* Body reading flow — optimal measure & rhythm */
.wp-block-post-content > p,
.wp-block-post-content > ul,
.wp-block-post-content > ol,
.wp-block-post-content > blockquote {
	margin-block: 1.1em;
}
.wp-block-post-content > h2 { margin-block: 1.2em 0.75em; }
.wp-block-post-content > h3 { margin-block: 1em 0.65em; }
.wp-block-post-content > h4 { margin-block: 0.85em 0.55em; }
.wp-block-post-content > h2:first-child,
.wp-block-post-content > h3:first-child { margin-top: 0; }

html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

body {
	font-feature-settings: "ss01", "cv11";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
	line-height: 1.5;
}

/* ------------------------------------------------------------------
 * 1b. Global responsive type scale (Inter)
 *     Bare element fallback — works even di tempat theme.json
 *     elements styles tidak menjangkau (raw HTML, plugin output).
 *     Skala fluid antara mobile (~360px) → desktop (~1440px).
 * ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
	color: var(--chatera-heading);
}
h1 {
	font-size: clamp(2.25rem, 2.4vw + 1.65rem, 3.25rem);
	line-height: 1.5;
	font-weight: 800;
	letter-spacing: -0.03em;
	margin-block: 0 0.6em;
	text-wrap: balance;
}
h2 {
	font-size: clamp(1.5rem, 0.9vw + 1.3rem, 1.875rem);
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin-block: 1.15em 0.85em;
	text-wrap: balance;
}
h3 {
	font-size: clamp(1.375rem, 0.8vw + 1.15rem, 1.625rem);
	line-height: 1.5;
	font-weight: 700;
	letter-spacing: -0.015em;
	margin-block: 1.4em 0.45em;
}
h4 {
	font-size: clamp(1.1875rem, 0.5vw + 1.05rem, 1.375rem);
	line-height: 1.5;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin-block: 1.25em 0.4em;
}
h5 {
	font-size: clamp(1.0625rem, 0.3vw + 0.99rem, 1.1875rem);
	line-height: 1.5;
	font-weight: 600;
	letter-spacing: -0.005em;
	margin-block: 1.15em 0.35em;
}
h6 {
	font-size: 0.875rem;
	line-height: 1.5;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-block: 1.1em 0.35em;
}
p {
	font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
	line-height: 1.5;
	margin-block: 0 1em;
}

/* Heading nyala sebagai first-child di kontainer apapun: hilangkan top margin */
h1:first-child, h2:first-child, h3:first-child,
h4:first-child, h5:first-child, h6:first-child {
	margin-top: 0;
}

/* Force heading color token on ALL post/card/hero/single titles so theme.json
   elements.heading color doesn't flatten the hierarchy. */
.wp-block-post-title,
.wp-block-post-title a,
.chatera-card__title,
.chatera-card__title a,
.chatera-hero__title,
.chatera-hero__title a,
.chatera-single__title,
.chatera-related__heading,
.section-title,
.chatera-footer__heading,
.chatera-cta-card__title {
	color: var(--chatera-heading) !important;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 3px;
}

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
	padding: 0.75rem 1rem;
	text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Scroll margin untuk anchor TOC agar tidak tertutup header */
:is(h1, h2, h3, h4, h5, h6)[id] {
	scroll-margin-top: calc(var(--chatera-header-height) + 1.5rem);
}

/* ------------------------------------------------------------------
 * 2. Dark mode fallback (jika style-variation tidak dimuat,
 *    kita tetap override via attribute + prefers-color-scheme).
 * ------------------------------------------------------------------ */
html[data-theme="dark"] {
	--wp--preset--color--background: #0F0F11;
	--wp--preset--color--surface: #18181B;
	--wp--preset--color--text: #D4D4D8;
	--wp--preset--color--text-muted: #8E8E97;
	--wp--preset--color--border: #2A2A30;
	--wp--preset--color--accent: #9F8FE8;
	--wp--preset--color--accent-soft: #2A1F5C;
	--wp--preset--color--primary: #5135C3;
	--wp--preset--color--on-primary: #FFFFFF;
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--text);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .wp-site-blocks {
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--text);
}

/* ------------------------------------------------------------------
 * 3. Header — sticky glass
 *    Sticky harus dipasang di template-part wrapper (anak langsung
 *    dari .wp-site-blocks) supaya containing block-nya = seluruh
 *    halaman, bukan height header itu sendiri.
 * ------------------------------------------------------------------ */
.wp-site-blocks > header,
.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > .wp-block-template-part,
header.wp-block-template-part:has(.chatera-header),
.wp-block-template-part:has(> .chatera-header),
body > .wp-site-blocks > header {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--wp--preset--color--background) 72%, transparent);
	backdrop-filter: saturate(180%) blur(18px);
	-webkit-backdrop-filter: saturate(180%) blur(18px);
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--border) 60%, transparent);
	transition: border-color var(--chatera-transition), background var(--chatera-transition), box-shadow var(--chatera-transition);
}
.chatera-header {
	position: relative;
	background: transparent;
}
.chatera-header::after {
	content: "";
	position: absolute;
	inset: auto 0 -1px 0;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, var(--wp--preset--color--border) 20%, var(--wp--preset--color--border) 80%, transparent 100%);
	opacity: 0.6;
	pointer-events: none;
}

html[data-theme="dark"] .wp-site-blocks > header,
html[data-theme="dark"] .wp-site-blocks > .wp-block-template-part,
html[data-theme="dark"] .wp-block-template-part:has(> .chatera-header) {
	background: color-mix(in srgb, var(--wp--preset--color--background) 68%, transparent);
	border-bottom-color: color-mix(in srgb, var(--wp--preset--color--border) 50%, transparent);
}

/* Hilangkan block-gap margin yang diterapkan WP antara header (sticky)
 * dan main — supaya konten nempel langsung di bawah header bar. */
.wp-site-blocks > .site-main,
.wp-site-blocks > main.site-main {
	margin-block-start: 0 !important;
}

.chatera-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: var(--chatera-header-height);
}

.chatera-header__brand {
	gap: 0.625rem !important;
	flex-shrink: 0;
}
/* Override box width yang otomatis disetel WP via "width" attribute
 * pada wp:site-logo. Skala berdasarkan tinggi supaya wordmark lebar
 * tetap terbaca utuh tanpa "kotak kosong" di sekelilingnya. */
.chatera-header__brand .wp-block-site-logo {
	display: flex !important;
	align-items: center;
	line-height: 0;
	width: auto !important;
	max-width: none !important;
	height: auto !important;
}
.chatera-header__brand .custom-logo-link {
	display: inline-flex;
	align-items: center;
	width: auto !important;
	height: auto !important;
	max-width: none !important;
}
.chatera-header__brand .wp-block-site-logo img,
.chatera-header__brand .wp-block-site-logo .custom-logo {
	width: auto !important;
	max-width: none !important;
	height: 32px !important;
	max-height: 32px !important;
	object-fit: contain;
	display: block;
}
.chatera-header__brand .wp-block-site-title a {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.chatera-header__nav {
	flex: 1;
	justify-content: center !important;
}

/* ------------------------------------------------------------------
 * Classic nav (chatera/nav block) — shared base
 * ------------------------------------------------------------------ */
.chatera-nav {
	display: block;
}
.chatera-nav__list {
	display: flex;
	gap: 0.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
}
.chatera-nav--horizontal .chatera-nav__list {
	flex-direction: row;
	flex-wrap: nowrap;
}
.chatera-nav--vertical .chatera-nav__list {
	flex-direction: column;
	align-items: stretch;
	gap: 0.25rem;
}
.chatera-nav .menu-item {
	position: relative;
	margin: 0;
	padding: 0;
}
.chatera-nav .menu-item > a {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 0.875rem;
	border-radius: 0.375rem;
	color: var(--wp--preset--color--text-muted);
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 500;
	font-size: 0.9rem;
	text-decoration: none;
	line-height: 1.4;
	transition: color var(--chatera-transition), background var(--chatera-transition);
}
.chatera-nav .menu-item > a:hover,
.chatera-nav .current-menu-item > a,
.chatera-nav .current-menu-ancestor > a {
	color: var(--wp--preset--color--text);
	background: var(--wp--preset--color--surface);
}
.chatera-nav .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-left: 0.4rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	opacity: 0.7;
}

/* Sub-menu (dropdown) — only on horizontal variant */
.chatera-nav--horizontal .sub-menu {
	position: absolute;
	top: calc(100% + 0.25rem);
	left: 0;
	min-width: 200px;
	list-style: none;
	margin: 0;
	padding: 0.375rem;
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.375rem;
	box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity var(--chatera-transition), transform var(--chatera-transition), visibility var(--chatera-transition);
	z-index: 50;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.chatera-nav--horizontal .menu-item-has-children:hover > .sub-menu,
.chatera-nav--horizontal .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.chatera-nav--horizontal .sub-menu .menu-item > a {
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
	white-space: nowrap;
}

/* Nav empty state (admin only) */
.chatera-nav__empty {
	margin: 0;
	font-size: 0.875rem;
}
.chatera-nav__empty a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
	padding: 0.4rem 0.75rem;
	border: 1px dashed var(--wp--preset--color--border);
	border-radius: 0.375rem;
	display: inline-block;
}

.chatera-header__actions {
	gap: 0.5rem !important;
	flex-shrink: 0;
}

/* ------------------------------------------------------------------
 * 4. Dark toggle button
 * ------------------------------------------------------------------ */
.chatera-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 9999px;
	border: 1px solid var(--wp--preset--color--border);
	background: transparent;
	color: var(--wp--preset--color--text);
	cursor: pointer;
	transition: background var(--chatera-transition), border-color var(--chatera-transition), transform var(--chatera-transition);
}
.chatera-theme-toggle:hover {
	background: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--text-muted);
}
.chatera-theme-toggle:active { transform: scale(0.94); }
.chatera-theme-toggle svg { width: 17px; height: 17px; }
.chatera-theme-toggle .icon-sun { display: none; }
.chatera-theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .chatera-theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .chatera-theme-toggle .icon-moon { display: none; }

/* ------------------------------------------------------------------
 * 4b. CTA buttons (Daftar etc.)
 * ------------------------------------------------------------------ */
.chatera-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.55rem 1.1rem;
	border-radius: 9999px;
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: -0.005em;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background var(--chatera-transition), transform var(--chatera-transition), box-shadow var(--chatera-transition);
	line-height: 1;
}
.chatera-btn svg { width: 14px; height: 14px; }
.chatera-btn--primary {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.chatera-btn--primary:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 85%, #000);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--wp--preset--color--primary) 45%, transparent);
}
.chatera-btn--primary:active { transform: translateY(0); }
.chatera-btn--block { width: 100%; padding-block: 0.85rem; font-size: 0.95rem; }

.chatera-header__cta svg { transition: transform var(--chatera-transition); }
.chatera-header__cta:hover svg { transform: translateX(2px); }

/* ------------------------------------------------------------------
 * 4c. Mobile menu toggle + dropdown
 * ------------------------------------------------------------------ */
.chatera-mobile-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 9999px;
	border: 1px solid var(--wp--preset--color--border);
	background: transparent;
	color: var(--wp--preset--color--text);
	cursor: pointer;
	transition: background var(--chatera-transition), border-color var(--chatera-transition), transform var(--chatera-transition), color var(--chatera-transition);
}
.chatera-mobile-toggle:hover {
	background: var(--wp--preset--color--surface);
}
.chatera-mobile-toggle:active { transform: scale(0.95); }
.chatera-mobile-toggle svg { width: 18px; height: 18px; }
.chatera-mobile-toggle .icon-close { display: none; }
.chatera-mobile-toggle[aria-expanded="true"] .icon-open { display: none; }
.chatera-mobile-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ------------------------------------------------------------------
 * Mobile drawer menu — modern sheet
 * ------------------------------------------------------------------ */
.chatera-mobile-menu {
	display: none;
	flex-direction: column;
	padding: 1rem 0 1.5rem !important;
	margin-top: 0.5rem;
	border-top: 1px solid var(--wp--preset--color--border);
	gap: 0.5rem !important;
	animation: chatera-mobile-fade 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.chatera-mobile-menu[hidden] { display: none !important; }

@keyframes chatera-mobile-fade {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Search input */
.chatera-mobile-menu .wp-block-search {
	width: 100%;
	margin: 0 0 0.25rem;
}
.chatera-mobile-menu .wp-block-search__inside-wrapper {
	border-radius: 9999px !important;
	border: 1px solid var(--wp--preset--color--border) !important;
	background: var(--wp--preset--color--surface) !important;
	overflow: hidden;
	padding: 0.25rem 0.25rem 0.25rem 0.5rem;
}
.chatera-mobile-menu .wp-block-search__input {
	border: none !important;
	background: transparent !important;
	padding: 0.5rem 0.75rem !important;
	font-size: 0.95rem !important;
}
.chatera-mobile-menu .wp-block-search__input:focus { outline: none !important; box-shadow: none !important; }
.chatera-mobile-menu .wp-block-search__button {
	border-radius: 9999px !important;
	background: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--on-primary) !important;
	border: none !important;
	width: 36px;
	height: 36px;
	padding: 0 !important;
}

/* Nav items — generous touch targets, modern feel */
.chatera-mobile-menu__nav { width: 100%; }
.chatera-mobile-menu .chatera-nav--vertical .chatera-nav__list { gap: 0.125rem; }
.chatera-mobile-menu .chatera-nav--vertical .menu-item > a,
.chatera-mobile-menu__nav .menu-item > a {
	padding: 0.875rem 1rem;
	font-size: 1.0625rem;
	font-weight: 500;
	color: var(--wp--preset--color--text);
	border-radius: 0.375rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: background var(--chatera-transition), color var(--chatera-transition);
}
.chatera-mobile-menu .chatera-nav--vertical .menu-item > a:hover,
.chatera-mobile-menu .chatera-nav--vertical .current-menu-item > a {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--accent);
}
.chatera-mobile-menu .chatera-nav--vertical .menu-item-has-children > a::after {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform var(--chatera-transition);
	margin-left: auto;
	opacity: 0.6;
}
.chatera-mobile-menu .chatera-nav--vertical .sub-menu {
	list-style: none;
	margin: 0.25rem 0 0.5rem 0.5rem;
	padding: 0 0 0 0.875rem;
	border-left: 2px solid var(--wp--preset--color--border);
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}
.chatera-mobile-menu .chatera-nav--vertical .sub-menu .menu-item > a {
	font-size: 0.9375rem;
	font-weight: 400;
	padding: 0.625rem 0.75rem;
	color: var(--wp--preset--color--text-muted);
}
.chatera-mobile-menu .chatera-nav--vertical .sub-menu .menu-item > a:hover {
	color: var(--wp--preset--color--text);
}

/* Divider */
.chatera-mobile-menu__divider {
	height: 1px;
	margin: 0.5rem 0 0.25rem;
	background: linear-gradient(90deg, transparent, var(--wp--preset--color--border) 30%, var(--wp--preset--color--border) 70%, transparent);
}

/* Footer row inside drawer: theme toggle + CTA */
.chatera-mobile-menu__footer {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding-top: 0.25rem;
}
.chatera-mobile-menu__footer .chatera-btn {
	flex: 1;
	justify-content: center;
}
.chatera-theme-toggle--inline {
	flex: 0 0 auto;
	width: auto;
	height: 44px;
	padding: 0 0.875rem;
	gap: 0.5rem;
	border-radius: 0.375rem;
}
.chatera-theme-toggle--inline .chatera-theme-toggle__label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wp--preset--color--text);
}

/* Tidak perlu body scroll lock — drawer pakai position:fixed jadi
 * tidak terpengaruh body scroll. overflow:hidden di body justru
 * mematahkan position:sticky pada header. */

/* ------------------------------------------------------------------
 * Responsive breakpoints — mobile header
 * ------------------------------------------------------------------ */
@media (max-width: 900px) {
	.chatera-mobile-toggle { display: inline-flex; }
	.chatera-mobile-menu { display: flex; }
	.chatera-mobile-menu[hidden] { display: none !important; }

	/* Hide nav horizontal, CTA, theme toggle dari header bar.
	 * Logo tetap tampil di kiri, hamburger di kanan. */
	.chatera-header__nav,
	.chatera-header__inner > .chatera-header__nav,
	.chatera-header__inner .chatera-nav--horizontal,
	.chatera-header__cta,
	.chatera-header__actions .chatera-theme-toggle:not(.chatera-theme-toggle--inline) {
		display: none !important;
	}

	.chatera-header__inner {
		justify-content: space-between !important;
	}

	/* Gutter horizontal — jauhkan konten dari tepi layar mobile */
	.chatera-header,
	.site-main,
	.chatera-footer {
		padding-left: 1.5rem !important;
		padding-right: 1.5rem !important;
	}

	/* Drawer menu: isi drawer tidak boleh lebih lebar dari parent
	 * (mencegah horizontal overflow / body bergeser ke kanan). */
	.chatera-mobile-menu {
		max-width: 100%;
		min-width: 0;
		width: 100%;
		overflow-x: hidden;
	}
	.chatera-mobile-menu > * {
		max-width: 100%;
		min-width: 0;
	}
	.chatera-mobile-menu .wp-block-search,
	.chatera-mobile-menu__nav,
	.chatera-mobile-menu .chatera-nav,
	.chatera-mobile-menu__footer {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}
	.chatera-mobile-menu .chatera-nav__list {
		width: 100%;
		box-sizing: border-box;
	}
	.chatera-mobile-menu .menu-item,
	.chatera-mobile-menu .menu-item > a {
		max-width: 100%;
		box-sizing: border-box;
		word-break: break-word;
	}
}

@media (max-width: 480px) {
	.chatera-header,
	.site-main,
	.chatera-footer {
		padding-left: 1.25rem !important;
		padding-right: 1.25rem !important;
	}
}

/* ------------------------------------------------------------------
 * Mobile tweaks — logo kecil, author card stack, breadcrumb ellipsis
 * ------------------------------------------------------------------ */
@media (max-width: 900px) {
	/* Logo header lebih kecil di mobile */
	.chatera-header__brand .wp-block-site-logo img,
	.chatera-header__brand .wp-block-site-logo .custom-logo {
		height: 28px !important;
		max-height: 28px !important;
	}

	/* Author card: stack vertikal (avatar di atas, info di bawah) */
	.chatera-single__author-card {
		padding: 1.5rem 1.25rem;
	}
	.chatera-single__author-card .wp-block-post-author {
		grid-template-columns: 1fr !important;
		gap: 1rem !important;
		text-align: center;
		justify-items: center;
	}
	.chatera-single__author-card .wp-block-post-author__content {
		align-items: center;
		width: 100%;
	}
	.chatera-single__author-card .wp-block-post-author__name {
		justify-content: center;
	}

	/* Breadcrumbs: 1 baris, sisa di-ellipsis (current page dipotong) */
	.chatera-breadcrumbs {
		flex-wrap: nowrap !important;
		white-space: nowrap;
		overflow: hidden;
		min-width: 0;
		max-width: 100%;
	}
	.chatera-breadcrumbs a,
	.chatera-breadcrumbs .sep {
		flex: 0 0 auto;
	}
	.chatera-breadcrumbs [aria-current="page"] {
		flex: 1 1 auto;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

@media (max-width: 480px) {
	.chatera-header__brand .wp-block-site-logo img,
	.chatera-header__brand .wp-block-site-logo .custom-logo {
		height: 24px !important;
		max-height: 24px !important;
	}
}

/* Global anti-overflow di mobile — pakai overflow-x: clip (bukan hidden)
 * supaya tidak membuat scrolling context yang mematahkan position:sticky
 * di header. clip support: Chrome 90+, FF 81+, Safari 15.4+. */
@media (max-width: 900px) {
	html, body {
		overflow-x: clip;
		max-width: 100%;
	}
	.wp-site-blocks {
		overflow-x: clip;
		max-width: 100vw;
	}
	.wp-site-blocks > *:not(header) {
		max-width: 100%;
		overflow-x: clip;
	}
	img, video, iframe, embed, object {
		max-width: 100%;
		height: auto;
	}

	/* Drawer = fixed overlay relatif ke VIEWPORT (bukan ke parent
	 * yang sticky). Selalu muncul tepat di bawah header bar, berapapun
	 * posisi scroll user. Layout dokumen tidak berubah → scroll position
	 * tetap saat menu dibuka di tengah halaman. */
	.chatera-mobile-menu {
		position: fixed;
		top: var(--chatera-header-height);
		left: 0;
		right: 0;
		width: 100%;
		max-width: 100vw !important;
		max-height: calc(100dvh - var(--chatera-header-height));
		margin: 0 !important;
		padding: 1rem 1.5rem 1.5rem !important;
		border-top: 1px solid var(--wp--preset--color--border);
		border-bottom: 1px solid var(--wp--preset--color--border);
		background: var(--wp--preset--color--background);
		box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.25);
		z-index: 99;
		box-sizing: border-box;
		overflow-x: clip;
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	html[data-theme="dark"] .chatera-mobile-menu {
		background: var(--wp--preset--color--background);
		box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.5);
	}
	.chatera-mobile-menu * {
		max-width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}
	.chatera-mobile-menu .wp-block-search,
	.chatera-mobile-menu .wp-block-search__inside-wrapper,
	.chatera-mobile-menu__footer,
	.chatera-mobile-menu__footer .chatera-btn {
		width: 100% !important;
		max-width: 100% !important;
	}
	.chatera-mobile-menu__footer {
		flex-wrap: wrap;
	}
}

/* ------------------------------------------------------------------
 * 5. Homepage — hero + grid
 * ------------------------------------------------------------------ */
/* Post Template UL becomes the 2-col grid. Strip default UL chrome. */
ul.chatera-hero.wp-block-post-template,
.chatera-hero {
	list-style: none;
	padding-inline: 0;
	margin: 0;
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
	padding-block: clamp(2rem, 5vw, 4rem) !important;
}
.chatera-hero > li,
.chatera-hero > .wp-block-post {
	display: contents;
}
.chatera-hero__media img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--chatera-radius-lg);
}
.chatera-hero__title {
	font-size: clamp(1.75rem, 2vw + 1.25rem, 2.625rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.5;
	margin-block: 0.75rem 1rem;
	text-wrap: balance;
}
.chatera-hero__excerpt {
	color: var(--wp--preset--color--text-muted);
	font-size: clamp(1rem, 0.5vw + 0.9rem, 1.1875rem);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
@media (max-width: 782px) {
	ul.chatera-hero.wp-block-post-template,
	.chatera-hero {
		grid-template-columns: 1fr !important;
		gap: clamp(1rem, 3vw, 1.5rem) !important;
		padding-block: clamp(1.5rem, 4vw, 2.5rem) !important;
	}
	.chatera-hero__media img {
		aspect-ratio: 16 / 10;
	}
	.chatera-hero__title {
		font-size: clamp(1.375rem, 2vw + 1rem, 1.75rem);
	}
}

/* Outer query wrapper = 3-col grid container */
.chatera-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.25rem, 3vw, 2rem);
}
@media (max-width: 960px) { .chatera-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .chatera-grid { grid-template-columns: 1fr; } }

/* Post Template (<ul>) inside .chatera-grid must span the full grid and
   itself render its <li> children as the 3-col grid. This mirrors how
   related-posts & archive render. */
.chatera-grid > .wp-block-post-template,
ul.wp-block-post-template.chatera-card {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.25rem, 3vw, 2rem);
	list-style: none;
	margin: 0;
	padding: 0;
}
@media (max-width: 960px) {
	.chatera-grid > .wp-block-post-template,
	ul.wp-block-post-template.chatera-card { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.chatera-grid > .wp-block-post-template,
	ul.wp-block-post-template.chatera-card { grid-template-columns: 1fr; }
}

/* Each card = one <li.wp-block-post> */
.chatera-grid .wp-block-post,
ul.wp-block-post-template.chatera-card > li {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	margin: 0;
	padding: 1.25rem 1.375rem 1.375rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--surface);
	list-style: none;
	transition: transform var(--chatera-transition), box-shadow var(--chatera-transition);
}
.chatera-grid .wp-block-post:hover,
ul.wp-block-post-template.chatera-card > li:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px -12px color-mix(in srgb, var(--wp--preset--color--text) 40%, transparent);
}

/* Card internals */
.chatera-card__media img {
	width: 100%;
	aspect-ratio: 2 / 1;
	object-fit: cover;
	border-radius: 0.5rem;
	transition: transform var(--chatera-transition);
}
.chatera-grid .wp-block-post:hover .chatera-card__media img,
ul.wp-block-post-template.chatera-card > li:hover .chatera-card__media img {
	transform: scale(1.02);
}
/* Top row on cards: category · reading time */
.chatera-card__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.625rem;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--text-muted);
	line-height: 1.5;
}
.chatera-card__top > * + *::before {
	content: "·";
	margin-right: 0.625rem;
	color: var(--wp--preset--color--text-muted);
}
.chatera-card__top .chatera-reading-time {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--text-muted);
	letter-spacing: 0;
	text-transform: none;
}

.chatera-card__category {
	display: inline-flex;
	align-items: center;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	color: var(--wp--preset--color--accent);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none;
}
.chatera-card__title,
.chatera-card__title.wp-block-post-title,
.wp-block-post-title.chatera-card__title,
h1.chatera-card__title,
h2.chatera-card__title,
h3.chatera-card__title,
h4.chatera-card__title {
	font-size: clamp(1rem, 0.25vw + 0.95rem, 1.125rem) !important;
	font-weight: 700 !important;
	letter-spacing: -0.015em !important;
	line-height: 1.5 !important;
	margin: 0 !important;
	min-height: calc(1.5em * 2);
	overflow: hidden;
	text-wrap: pretty;
}
/* Apply line-clamp on the link itself — most reliable cross-browser */
.chatera-card__title a,
.chatera-card__title.wp-block-post-title a {
	display: -webkit-box !important;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.5 !important;
	word-break: break-word;
	overflow-wrap: anywhere;
}
/* Fallback when title has no <a> wrapping */
.chatera-card__title:not(:has(a)) {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	text-overflow: ellipsis;
}

/* Related posts — slightly smaller cards below single article */
.chatera-related .chatera-card__title,
.chatera-related .wp-block-post-title {
	font-size: clamp(0.9375rem, 0.2vw + 0.9rem, 1.0625rem) !important;
	line-height: 1.5 !important;
}
.chatera-related__heading { font-size: clamp(1.125rem, 0.5vw + 1rem, 1.375rem) !important; }
.chatera-related .chatera-card__media img { aspect-ratio: 16 / 10; }
.chatera-card__title a {
	color: inherit;
	text-decoration: none;
}
.chatera-card__title a:hover { color: var(--wp--preset--color--accent); }
.chatera-card__meta {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
	display: flex;
	gap: 0.5rem 0.75rem;
	align-items: center;
	flex-wrap: wrap;
	line-height: 1.5;
}
.chatera-card__meta > * + *::before {
	content: "·";
	margin-right: 0.75rem;
	color: var(--wp--preset--color--text-muted);
}
.chatera-card__meta > .chatera-card__author::before { content: none; }

/* Author block (inline within meta): avatar + name */
.chatera-card__author.wp-block-post-author {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
	line-height: 1.5;
}
.chatera-card__author .wp-block-post-author__avatar {
	display: inline-flex;
	line-height: 0;
	flex-shrink: 0;
	margin: 0 !important;
	padding: 0 !important;
}
.chatera-card__author .wp-block-post-author__avatar img,
.chatera-card__author .avatar {
	width: 20px;
	height: 20px;
	border-radius: 9999px;
	object-fit: cover;
	display: block;
	margin: 0 !important;
}
.chatera-card__author .wp-block-post-author__content {
	margin: 0 !important;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
}
.chatera-card__author .wp-block-post-author__name {
	font-weight: 500;
	color: var(--wp--preset--color--text-muted);
	line-height: 1.5;
	white-space: nowrap;
	font-size: var(--wp--preset--font-size--sm);
	margin: 0 !important;
	padding: 0 !important;
}

/* Hero author — larger avatar than card */
.chatera-hero__author.wp-block-post-author {
	gap: 0.625rem;
	font-size: var(--wp--preset--font-size--sm);
}
.chatera-hero__author .wp-block-post-author__avatar img,
.chatera-hero__author .avatar {
	width: 28px !important;
	height: 28px !important;
}
.chatera-hero__author .wp-block-post-author__name {
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--text);
}
.chatera-hero__meta {
	gap: 0.625rem 0.875rem !important;
	align-items: center !important;
}

/* Date — same size/weight/color as author name */
.chatera-card__date,
.chatera-card__meta .chatera-card__date,
.chatera-card__meta .wp-block-post-date {
	font-size: var(--wp--preset--font-size--sm) !important;
	color: var(--wp--preset--color--text-muted);
	font-weight: 500;
	line-height: 1.5;
}

:where(.section-title) {
	/* Gunakan ukuran h2 global — tidak ada override font-size/weight di sini */
	margin: 0;
	padding: 0;
	border: 0;
	line-height: 1.5;
}

/* Latest header row — title + view all link */
.chatera-latest-header {
	margin-top: clamp(3rem, 5vw, 4rem) !important;
	margin-bottom: clamp(1.25rem, 2vw, 2rem) !important;
	padding-bottom: 1.25rem !important;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
/* ------------------------------------------------------------------
 * 6. Single article layout — modernized full-width
 *    Two columns inside the 1240px container: main (fluid) + sticky
 *    sidebar (340px). Body text constrained to 760px for readability;
 *    title / hero / byline span the full main column for impact.
 * ------------------------------------------------------------------ */
.chatera-single {
	padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
}

.chatera-single__layout {
	align-items: flex-start !important;
	gap: clamp(1.5rem, 3vw, 3rem) !important;
}
.chatera-single__main {
	min-width: 0;
	flex: 1;
}
.chatera-single__aside {
	position: sticky;
	top: calc(var(--chatera-header-height) + 1.5rem);
	align-self: flex-start;
	max-height: calc(100vh - var(--chatera-header-height) - 2rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--wp--preset--color--border) transparent;
}
.chatera-single__aside::-webkit-scrollbar { width: 6px; }
.chatera-single__aside::-webkit-scrollbar-track { background: transparent; }
.chatera-single__aside::-webkit-scrollbar-thumb {
	background: var(--wp--preset--color--border);
	border-radius: 9999px;
}

@media (max-width: 960px) {
	.chatera-single__layout { flex-direction: column !important; }
	.chatera-single__aside {
		position: static;
		width: 100% !important;
		flex-basis: auto !important;
		max-height: none;
		overflow: visible;
	}
	/* TOC widget tidak berguna di mobile (jatuh di bawah artikel) — sembunyikan. */
	.chatera-sidebar__widget--toc { display: none; }
}

/* ----- Heading section (full-width, no columns) ----- */
.chatera-single__heading {
	margin-bottom: clamp(2rem, 4vw, 3rem);
}
.chatera-single__heading > * + * { margin-block-start: 1.75rem; }

.chatera-single__heading .chatera-breadcrumbs {
	margin: 0 0 0.5rem;
}

.chatera-single__title {
	font-size: clamp(1.875rem, 1rem + 2.4vw, 3rem) !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	letter-spacing: -0.018em !important;
	margin-block: 1rem 1.5rem !important;
	max-width: none;
	text-wrap: pretty;
	color: var(--wp--preset--color--text);
}
.chatera-single__dek {
	font-size: clamp(1rem, 0.3vw + 0.95rem, 1.1875rem) !important;
	line-height: 1.6 !important;
	color: var(--wp--preset--color--text-muted) !important;
	margin-block: 1.5rem 0 !important;
	letter-spacing: -0.005em;
	max-width: none;
}

/* Meta block — stacked rows: dates then author */
.chatera-single__meta {
	display: flex !important;
	flex-direction: column;
	gap: 0.625rem;
	margin-top: 1.5rem;
}

.chatera-single__dates {
	align-items: center !important;
	gap: 0.45rem !important;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
}
.chatera-single__dates .chatera-single__date {
	font-size: inherit;
	color: inherit;
}

.chatera-single__meta-label {
	color: var(--wp--preset--color--text-muted);
	font-weight: 500;
}
.chatera-single__meta-sep {
	color: color-mix(in srgb, var(--wp--preset--color--text-muted) 55%, transparent);
	font-weight: 400;
	margin-inline: 0.15rem;
}

.chatera-single__heading-author {
	align-items: center !important;
	justify-content: space-between !important;
	gap: 1rem !important;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1;
}
.chatera-single__heading-author-who {
	align-items: center !important;
	gap: 0.5rem !important;
	line-height: 1;
}
.chatera-single__heading-author-who > * {
	display: inline-flex;
	align-items: center;
}
.chatera-single__heading-author .chatera-single__meta-label {
	line-height: 1;
}
.chatera-single__heading-author .wp-block-post-author {
	display: inline-flex !important;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	line-height: 1;
}
.chatera-single__heading-author .wp-block-post-author__avatar {
	display: inline-flex;
	align-items: center;
	margin: 0;
	line-height: 0;
}
.chatera-single__heading-author .wp-block-post-author__avatar img {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 9999px;
	object-fit: cover;
	box-shadow: 0 0 0 1.5px var(--wp--preset--color--surface),
	            0 0 0 2.5px color-mix(in srgb, var(--wp--preset--color--accent) 70%, transparent);
}
.chatera-single__heading-author .wp-block-post-author__content {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	line-height: 1;
}
.chatera-single__heading-author .wp-block-post-author__name {
	margin: 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	line-height: 1;
	color: var(--wp--preset--color--text);
}
.chatera-single__heading-author .wp-block-post-author__name a {
	color: inherit;
	text-decoration: none;
}
.chatera-single__heading-author .wp-block-post-author__byline,
.chatera-single__heading-author .wp-block-post-author__bio {
	display: none;
}

/* Hide empty modified date + neighbors (set by JS on page load) */
.chatera-single__dates .chatera-single__date.is-empty,
.chatera-single__dates .chatera-single__meta-label.is-orphan,
.chatera-single__dates .chatera-single__meta-sep.is-orphan {
	display: none !important;
}

/* ----- Share popover (right-aligned di heading-author row) ----- */
.chatera-share-pop {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-left: auto;
	flex-shrink: 0;
}
.chatera-share-pop__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 9999px;
	background: color-mix(in srgb, var(--wp--preset--color--surface) 70%, transparent);
	color: var(--wp--preset--color--text-muted);
	cursor: pointer;
	transition: color var(--chatera-transition),
	            border-color var(--chatera-transition),
	            background var(--chatera-transition),
	            transform var(--chatera-transition);
}
.chatera-share-pop__trigger:hover,
.chatera-share-pop__trigger[aria-expanded="true"] {
	color: var(--wp--preset--color--accent);
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 60%, var(--wp--preset--color--border));
	background: color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent);
}
.chatera-share-pop__trigger svg { width: 15px; height: 15px; }

.chatera-share-pop__panel {
	position: absolute;
	top: calc(100% + 0.625rem);
	right: 0;
	z-index: 60;
	width: max-content;
	max-width: min(540px, calc(100vw - 2rem));
	padding: 0.875rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--chatera-radius-lg);
	background: var(--wp--preset--color--surface);
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.25),
	            0 0 0 1px color-mix(in srgb, var(--wp--preset--color--border) 50%, transparent);
	transform-origin: top right;
	animation: chatera-pop-in 160ms cubic-bezier(0.4, 0, 0.2, 1);
}
.chatera-share-pop__panel::before {
	content: "";
	position: absolute;
	top: -6px;
	right: 12px;
	width: 12px;
	height: 12px;
	background: var(--wp--preset--color--surface);
	border-top: 1px solid var(--wp--preset--color--border);
	border-left: 1px solid var(--wp--preset--color--border);
	transform: rotate(45deg);
}
.chatera-share-pop__panel[hidden] { display: none; }

@keyframes chatera-pop-in {
	from { opacity: 0; transform: translateY(-4px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.chatera-share-pop__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.625rem;
	padding-bottom: 0.625rem;
	border-bottom: 1px dashed var(--wp--preset--color--border);
}
.chatera-share-pop__title {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-muted);
}
.chatera-share-pop__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: none;
	border-radius: 9999px;
	background: transparent;
	color: var(--wp--preset--color--text-muted);
	cursor: pointer;
	transition: background var(--chatera-transition), color var(--chatera-transition);
}
.chatera-share-pop__close:hover {
	background: color-mix(in srgb, var(--wp--preset--color--border) 60%, transparent);
	color: var(--wp--preset--color--text);
}
.chatera-share-pop__close svg { width: 13px; height: 13px; }

.chatera-share-pop__grid {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.4rem;
}
.chatera-share-pop__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	transition: transform var(--chatera-transition);
}
.chatera-share-pop__item:hover { transform: translateY(-1px); }
.chatera-share-pop__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 9999px;
	background: color-mix(in srgb, var(--wp--preset--color--surface) 60%, transparent);
	color: var(--wp--preset--color--text);
	transition: box-shadow var(--chatera-transition);
}
.chatera-share-pop__item:hover .chatera-share-pop__icon {
	box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.3);
}
.chatera-share-pop__icon svg { width: 16px; height: 16px; }
.chatera-share-pop__icon[data-brand="x"]        { background: #000; color: #fff; }
.chatera-share-pop__icon[data-brand="whatsapp"] { background: #25D366; color: #fff; }
.chatera-share-pop__icon[data-brand="facebook"] { background: #1877F2; color: #fff; }
.chatera-share-pop__icon[data-brand="linkedin"] { background: #0A66C2; color: #fff; }
.chatera-share-pop__icon[data-brand="telegram"] { background: #229ED9; color: #fff; }
.chatera-share-pop__icon[data-brand="copy"]     { background: color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent); color: var(--wp--preset--color--accent); }

@media (max-width: 540px) {
	.chatera-share-pop__grid { gap: 0.3rem; }
	.chatera-share-pop__icon {
		width: 32px;
		height: 32px;
	}
	.chatera-share-pop__icon svg { width: 14px; height: 14px; }
}

/* Hero featured image — wider, refined depth */
.chatera-single__hero {
	margin-block: 0 1.25rem;
}
.chatera-single__hero .wp-block-post-featured-image {
	margin: 0;
}
.chatera-single__hero .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--chatera-radius-lg);
	box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.3),
	            0 0 0 1px var(--wp--preset--color--border);
}

/* Body — fills the full content column width */
.chatera-single__body {
	font-size: 1.0625rem;
	line-height: 1.5;
	margin-block: 2.5rem 0;
}
.chatera-single__body > * {
	max-width: none;
	margin-inline: 0;
}
.chatera-single__body .alignwide,
.chatera-single__body .alignfull {
	max-width: none;
	margin-inline: 0;
}
:where(.chatera-single__body) :is(h2, h3, h4) {
	letter-spacing: -0.012em;
	font-weight: 600;
	scroll-margin-top: calc(var(--chatera-header-height) + 1rem);
}
:where(.chatera-single__body) h2 {
	font-size: clamp(1.4375rem, 0.7vw + 1.275rem, 1.75rem);
	line-height: 1.3;
	margin-block: 1.4rem 1rem;
}
:where(.chatera-single__body) h3 {
	font-size: clamp(1.1875rem, 0.35vw + 1.1rem, 1.4375rem);
	line-height: 1.4;
	margin-block: 1.15rem 0.85rem;
}
:where(.chatera-single__body) h4 {
	font-size: 1.125rem;
	line-height: 1.45;
	margin-block: 0.95rem 0.7rem;
}
.chatera-single__body p { margin-block: 0 1.5rem; }
.chatera-single__body :is(ul, ol) { margin-block: 0 1.5rem; }
.chatera-single__body li { margin-block: 0 0.5rem; }
.chatera-single__body blockquote { margin-block: 2rem; }

/* Force rounded corners on every image inside the post body, matching the
   featured image, with equal top/bottom spacing between blocks. */
.chatera-single__body :is(figure, .wp-block-image, .wp-block-gallery, .wp-block-cover, .wp-block-media-text) {
	margin-block: 2rem;
}
.chatera-single__body :is(figure, .wp-block-image, .wp-block-gallery, .wp-block-cover) :is(img, video) {
	border-radius: var(--chatera-radius-lg) !important;
}
.chatera-single__body :is(figure, .wp-block-image, .wp-block-gallery, .wp-block-cover) :is(img, video) {
	display: block;
	max-width: 100%;
	height: auto;
}
.chatera-single__body p > img,
.chatera-single__body > img {
	display: block;
	max-width: 100%;
	height: auto;
	margin-block: 2rem;
	border-radius: var(--chatera-radius-lg) !important;
}
.chatera-single__body figure figcaption,
.chatera-single__body .wp-block-image figcaption {
	margin-block: 0.65rem 0;
}

/* Tag strip below body — pill chips with hover lift */
.chatera-single__tags {
	gap: 0.5rem !important;
	margin-block: 2.25rem 2rem;
}
.chatera-single__tags .wp-block-post-terms a {
	display: inline-block;
	padding: 0.35rem 0.85rem;
	margin-right: 0.4rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 9999px;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	color: var(--wp--preset--color--text-muted);
	background: color-mix(in srgb, var(--wp--preset--color--surface) 70%, transparent);
	text-decoration: none;
	transition: color var(--chatera-transition),
	            border-color var(--chatera-transition),
	            transform var(--chatera-transition),
	            box-shadow var(--chatera-transition);
}
.chatera-single__tags .wp-block-post-terms a:hover {
	color: var(--wp--preset--color--accent);
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 60%, transparent);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--wp--preset--color--accent) 50%, transparent);
}

/* In-article CTA — built-in promo card between article body and author */
.chatera-inarticle-cta {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.25fr);
	align-items: stretch;
	border-radius: var(--chatera-radius-lg);
	background: #0f172a;
	color: #fff;
	margin-block: 4rem 0;
}
.chatera-inarticle-cta--no-media {
	grid-template-columns: 1fr;
}
.chatera-inarticle-cta--no-media .chatera-inarticle-cta__content {
	padding: clamp(2rem, 3vw, 2.75rem) clamp(1.75rem, 3vw, 2.75rem);
	background:
		radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--wp--preset--color--accent) 28%, transparent), transparent 60%),
		#0f172a;
	border-radius: var(--chatera-radius-lg);
}
.chatera-inarticle-cta__divider {
	appearance: none;
	border: 0;
	border-top: 1px dashed var(--wp--preset--color--border);
	background: transparent;
	margin: 2rem 0;
	padding: 0;
	height: 0;
	width: 100%;
}
.chatera-inarticle-cta__divider + .wp-block-group.chatera-single__author-card {
	margin-top: 0;
}
.chatera-inarticle-cta__media {
	display: block;
	background: var(--wp--preset--color--accent);
	line-height: 0;
	text-decoration: none;
	border-radius: var(--chatera-radius-lg) 0 0 var(--chatera-radius-lg);
	overflow: hidden;
	height: 100%;
	min-height: 100%;
}
.chatera-inarticle-cta__media img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center;
}
.chatera-inarticle-cta__content {
	padding: clamp(1.5rem, 2.5vw, 2.25rem) clamp(1.5rem, 2.5vw, 2.5rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.9rem;
}
.chatera-inarticle-cta__title {
	color: #fff;
	margin: 0;
	scroll-margin-top: calc(var(--chatera-header-height) + 1rem);
}
.chatera-inarticle-cta__desc {
	font-size: 1.0625rem;
	line-height: 1.5;
	color: color-mix(in srgb, #ffffff 75%, transparent);
	margin: 0;
}
.chatera-inarticle-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 0.5rem;
}
.chatera-inarticle-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.7rem 1.25rem;
	border-radius: 9999px;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform var(--chatera-transition),
	            background-color var(--chatera-transition),
	            border-color var(--chatera-transition),
	            color var(--chatera-transition),
	            box-shadow var(--chatera-transition);
}
.chatera-inarticle-cta__btn--primary {
	background: var(--wp--preset--color--accent);
	color: #fff;
	box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--wp--preset--color--accent) 75%, transparent);
}
.chatera-inarticle-cta__btn--primary:hover {
	background: color-mix(in srgb, var(--wp--preset--color--accent) 85%, #000000);
	color: #fff;
	transform: translateY(-1px);
}
html[data-theme="dark"] .chatera-inarticle-cta__btn--primary {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
	box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--wp--preset--color--primary) 75%, transparent);
}
html[data-theme="dark"] .chatera-inarticle-cta__btn--primary:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 85%, #ffffff);
	color: var(--wp--preset--color--on-primary);
}
.chatera-inarticle-cta__btn--primary:hover .chatera-inarticle-cta__btn-icon {
	transform: translateX(3px);
}
.chatera-inarticle-cta__btn-icon {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	transition: transform var(--chatera-transition);
}
.chatera-inarticle-cta__btn--ghost {
	background: transparent;
	color: #fff;
	border-color: color-mix(in srgb, #ffffff 32%, transparent);
}
.chatera-inarticle-cta__btn--ghost:hover {
	background: color-mix(in srgb, #ffffff 8%, transparent);
	border-color: color-mix(in srgb, #ffffff 55%, transparent);
	color: #fff;
	transform: translateY(-1px);
}
@media (max-width: 720px) {
	.chatera-inarticle-cta {
		grid-template-columns: 1fr;
	}
	.chatera-inarticle-cta__media {
		border-radius: var(--chatera-radius-lg) var(--chatera-radius-lg) 0 0;
		height: auto;
		min-height: 0;
	}
	.chatera-inarticle-cta__media img {
		height: auto;
		object-fit: initial;
	}
	.chatera-inarticle-cta__content {
		padding: 1.5rem;
	}
	.chatera-inarticle-cta__actions {
		width: 100%;
	}
	.chatera-inarticle-cta__btn {
		flex: 1 1 auto;
	}
}

/* Author bio card — premium gradient frame */
.chatera-single__author-card {
	position: relative;
	padding: 1.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--chatera-radius-lg);
	background:
		radial-gradient(70% 100% at 0% 0%, color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent), transparent 65%),
		var(--wp--preset--color--surface);
	margin-block: 2rem 2.5rem;
	overflow: hidden;
}
.chatera-single__author-card::after {
	content: "";
	position: absolute;
	inset: auto -40px -60px auto;
	width: 220px;
	height: 220px;
	border-radius: 9999px;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent), transparent);
	pointer-events: none;
}
.chatera-single__author-card .wp-block-post-author {
	position: relative;
	display: grid !important;
	grid-template-columns: auto 1fr;
	gap: 1.25rem;
	align-items: center;
}
.chatera-single__author-card .wp-block-post-author__avatar {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}
.chatera-single__author-card .wp-block-post-author__avatar img {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 9999px;
	object-fit: cover;
	box-shadow: 0 0 0 3px var(--wp--preset--color--surface),
	            0 0 0 4px color-mix(in srgb, var(--wp--preset--color--accent) 70%, transparent);
}
/* Header row: [Nama Penulis] [pill "Penulis"] inline */
.chatera-single__author-card .wp-block-post-author__content {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	min-width: 0;
}
.chatera-single__author-card .wp-block-post-author__name {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.625rem;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.018em;
	color: var(--wp--preset--color--text);
	margin: 0;
	line-height: 1.5;
}
.chatera-single__author-card .wp-block-post-author__name a {
	color: inherit;
	text-decoration: none;
}
.chatera-single__author-card .wp-block-post-author__name::after {
	content: "Penulis";
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.6rem;
	border-radius: 9999px;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 14%, transparent);
	color: var(--wp--preset--color--accent);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1;
}
/* Hide the default byline node since we render it as a pill via ::after */
.chatera-single__author-card .wp-block-post-author__byline {
	display: none;
}
.chatera-single__author-card .wp-block-post-author__bio {
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--wp--preset--color--text-muted);
	margin: 0;
}

/* Sidebar — TOC progress bar */
.chatera-toc-progress {
	position: relative;
	height: 4px;
	background: var(--wp--preset--color--border);
	border-radius: 9999px;
	overflow: hidden;
	margin-top: 0.75rem;
}
.chatera-toc-progress__bar {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0%;
	background: var(--wp--preset--color--accent);
	transition: width 60ms linear;
}

/* Sidebar — mini author */
.chatera-sidebar__widget--author .wp-block-post-author {
	display: grid !important;
	grid-template-columns: auto 1fr;
	gap: 0.75rem;
	align-items: center;
}
.chatera-sidebar__widget--author .wp-block-post-author__avatar img {
	width: 40px;
	height: 40px;
	border-radius: 9999px;
	object-fit: cover;
}
.chatera-sidebar__widget--author .wp-block-post-author__name {
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--text);
}
.chatera-sidebar__widget--author .wp-block-post-author__name a {
	color: inherit;
	text-decoration: none;
}

/* Sidebar — popular this week */
.chatera-sidebar__popular-list .wp-block-post {
	counter-increment: chatera-pop;
	padding-block: 0.625rem;
	border-bottom: 1px dashed var(--wp--preset--color--border);
}
.chatera-sidebar__popular-list { counter-reset: chatera-pop; }
.chatera-sidebar__popular-list .wp-block-post:last-child {
	border-bottom: none;
	padding-bottom: 0;
}
.chatera-sidebar__popular-row {
	gap: 0.75rem !important;
	align-items: flex-start !important;
}
.chatera-sidebar__popular-row::before {
	content: counter(chatera-pop, decimal-leading-zero);
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.875rem;
	font-weight: 800;
	color: var(--wp--preset--color--accent);
	letter-spacing: -0.02em;
	flex-shrink: 0;
	width: 1.5rem;
	line-height: 1.5;
}
.chatera-sidebar__popular-body {
	display: flex !important;
	flex-direction: column;
	gap: 0.05rem;
	min-width: 0;
	flex: 1;
}
.chatera-sidebar__popular-title,
.chatera-sidebar__popular-title.wp-block-post-title {
	font-size: 0.9375rem !important;
	font-weight: 600 !important;
	line-height: 1.5 !important;
	margin: 0 !important;
}
.chatera-sidebar__popular-title a {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}
.chatera-sidebar__popular-title a:hover {
	color: var(--wp--preset--color--accent);
}
.chatera-sidebar__popular-meta {
	display: block;
	margin-top: 0;
	font-size: 0.75rem;
	color: var(--wp--preset--color--text-muted);
}

/* Sidebar — topic tag cloud */
.chatera-sidebar__widget--topics .wp-block-tag-cloud,
.chatera-sidebar__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}
.chatera-sidebar__widget--topics .wp-block-tag-cloud a {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 9999px;
	font-size: 0.8125rem !important;
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	transition: all var(--chatera-transition);
}
.chatera-sidebar__widget--topics .wp-block-tag-cloud a:hover {
	color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

/* ------------------------------------------------------------------
 * 6c. Sidebar widgets
 * ------------------------------------------------------------------ */
.chatera-sidebar {
	display: flex !important;
	flex-direction: column;
	gap: 1.25rem;
}
.chatera-sidebar__widget {
	padding: 1.25rem 1.375rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--chatera-radius-lg);
	background: color-mix(in srgb, var(--wp--preset--color--surface) 80%, transparent);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: border-color var(--chatera-transition),
	            box-shadow var(--chatera-transition),
	            transform var(--chatera-transition);
}
.chatera-sidebar__widget:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 35%, var(--wp--preset--color--border));
	box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.18);
}
.chatera-sidebar__widget--toc .chatera-toc {
	border-left: none;
	padding-left: 0;
}
/* TOC modern — vertical guide line + bullet dot per heading.
   Bullet 8px (left:0, center x=4px). Line 2px (left:3px, center x=4px). */
.chatera-sidebar__widget--toc .chatera-toc ul {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0 0 0 1.125rem;
}
.chatera-sidebar__widget--toc .chatera-toc ul::before {
	content: "";
	position: absolute;
	top: 0.85rem;
	bottom: 0.85rem;
	left: 3px;
	width: 2px;
	border-radius: 2px;
	background: color-mix(in srgb, var(--wp--preset--color--border) 35%, transparent);
}
.chatera-sidebar__widget--toc .chatera-toc ul ul {
	padding-left: 1rem;
	margin-top: 0.25rem;
}
.chatera-sidebar__widget--toc .chatera-toc ul ul::before {
	background: color-mix(in srgb, var(--wp--preset--color--border) 25%, transparent);
	top: 0.65rem;
	bottom: 0.65rem;
}
.chatera-sidebar__widget--toc .chatera-toc li {
	position: relative;
	padding: 0.35rem 0;
	margin: 0;
}
.chatera-sidebar__widget--toc .chatera-toc a {
	position: relative;
	display: block;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	transition: color var(--chatera-transition);
}
.chatera-sidebar__widget--toc .chatera-toc a::before {
	content: "";
	position: absolute;
	top: 0.5lh;
	left: -1.125rem;
	width: 8px;
	height: 8px;
	border-radius: 9999px;
	background: var(--wp--preset--color--surface);
	border: 1.5px solid color-mix(in srgb, var(--wp--preset--color--border) 50%, transparent);
	box-sizing: border-box;
	transform: translateY(-50%);
	z-index: 1;
	transition: background var(--chatera-transition),
	            border-color var(--chatera-transition),
	            box-shadow var(--chatera-transition);
}
.chatera-sidebar__widget--toc .chatera-toc ul ul a::before {
	left: -1rem;
	width: 6px;
	height: 6px;
	border-width: 1px;
}
.chatera-sidebar__widget--toc .chatera-toc a:hover {
	color: var(--wp--preset--color--text);
}
.chatera-sidebar__widget--toc .chatera-toc a:hover::before {
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 60%, var(--wp--preset--color--border));
}
.chatera-sidebar__widget--toc .chatera-toc a.is-active {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
}
.chatera-sidebar__widget--toc .chatera-toc a.is-active::before {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent);
}
.chatera-sidebar__label {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-muted);
	margin: 0 0 0.75rem;
}

/* ------------------------------------------------------------------
 * 6d. CTA Card (top of sidebar)
 * ------------------------------------------------------------------ */
.chatera-cta-card {
	position: relative;
	padding: 1.625rem 1.5rem 1.5rem;
	border-radius: var(--chatera-radius-lg);
	overflow: hidden;
	background:
		radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent) 0%, transparent 60%),
		linear-gradient(160deg,
			color-mix(in srgb, var(--wp--preset--color--accent) 10%, var(--wp--preset--color--surface)) 0%,
			var(--wp--preset--color--surface) 100%);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--accent) 30%, var(--wp--preset--color--border));
	box-shadow: 0 8px 24px -12px color-mix(in srgb, var(--wp--preset--color--accent) 40%, transparent);
}
.chatera-cta-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(600px 100px at 50% 0%, color-mix(in srgb, var(--wp--preset--color--accent) 15%, transparent), transparent 60%);
	pointer-events: none;
}
.chatera-cta-card > * { position: relative; }
.chatera-cta-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var(--wp--preset--color--accent);
	color: #fff;
	margin-bottom: 0.875rem;
	box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--wp--preset--color--accent) 60%, transparent);
}
.chatera-cta-card__icon svg { width: 20px; height: 20px; }
.chatera-cta-card__title {
	font-family: var(--wp--preset--font-family--inter);
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.022em;
	line-height: 1.5;
	color: var(--wp--preset--color--text);
	margin: 0 0 0.5rem;
	text-wrap: balance;
}
.chatera-cta-card__text {
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--wp--preset--color--text-muted);
	margin: 0 0 1rem;
}
.chatera-cta-card .chatera-btn {
	display: flex;
	width: 100%;
	box-sizing: border-box;
	margin-block-start: 0.25rem;
	padding-block: 0.75rem;
	padding-inline: 1rem;
	font-size: 0.9rem;
}
.chatera-cta-card__note {
	font-size: 0.75rem;
	color: var(--wp--preset--color--text-muted);
	margin: 0.75rem 0 0;
	text-align: center;
	opacity: 0.85;
}

/* Compact share variant inside sidebar */
.chatera-share--compact {
	padding: 0;
	margin: 0;
	border: none;
	gap: 0.4rem;
}
.chatera-share--compact .chatera-share__btn {
	width: 36px;
	height: 36px;
}
.chatera-share--compact .chatera-share__btn svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------------
 * 7. Post meta
 * ------------------------------------------------------------------ */
.chatera-post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
	padding-block: 1rem;
	border-top: 1px solid var(--wp--preset--color--border);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.chatera-post-meta .author {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--wp--preset--color--text);
	font-weight: 600;
	text-decoration: none;
}
.chatera-post-meta .author img {
	width: 28px;
	height: 28px;
	border-radius: 9999px;
	object-fit: cover;
}
.chatera-post-meta > * + *::before {
	content: "·";
	margin-right: 1rem;
	color: var(--wp--preset--color--border);
}

/* ------------------------------------------------------------------
 * 8. TOC
 * ------------------------------------------------------------------ */
.chatera-toc {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--sm);
	border-left: 1px solid var(--wp--preset--color--border);
	padding-left: 1rem;
}
.chatera-toc__heading {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--text-muted);
	margin: 0 0 0.75rem;
	font-weight: 700;
}
.chatera-toc ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.chatera-toc ul ul { padding-left: 0.875rem; margin-top: 0.25rem; }
.chatera-toc li { margin: 0; padding: 0.25rem 0; }
.chatera-toc a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	display: block;
	line-height: 1.5;
	transition: color var(--chatera-transition);
}
.chatera-toc a:hover { color: var(--wp--preset--color--text); }
.chatera-toc a.is-active {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
}
.chatera-toc[hidden] { display: none; }

/* ------------------------------------------------------------------
 * 9. Progress bar
 * ------------------------------------------------------------------ */
.chatera-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0%;
	background: var(--wp--preset--color--accent);
	z-index: 200;
	transition: width 60ms linear;
	pointer-events: none;
}

/* ------------------------------------------------------------------
 * 10. Breadcrumbs
 * ------------------------------------------------------------------ */
.chatera-breadcrumbs {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-block: 1rem;
}
.chatera-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}
.chatera-breadcrumbs a:hover {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}
.chatera-breadcrumbs .sep {
	color: color-mix(in srgb, var(--wp--preset--color--text-muted) 60%, transparent);
}
.chatera-breadcrumbs [aria-current="page"] {
	color: inherit;
	font-weight: inherit;
}

/* ------------------------------------------------------------------
 * 11. Share buttons
 * ------------------------------------------------------------------ */
.chatera-share {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	padding-block: 1.5rem;
	margin-block: 2rem;
	border-top: 1px solid var(--wp--preset--color--border);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.chatera-share__label {
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--text-muted);
	margin-right: 0.5rem;
}
.chatera-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 9999px;
	border: 1px solid var(--wp--preset--color--border);
	background: transparent;
	color: var(--wp--preset--color--text);
	cursor: pointer;
	transition: all var(--chatera-transition);
	text-decoration: none;
}
.chatera-share__btn:hover {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-primary);
	border-color: var(--wp--preset--color--accent);
}
.chatera-share__btn svg { width: 18px; height: 18px; }

/* Copy feedback toast */
.chatera-toast {
	position: fixed;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%) translateY(1rem);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
	padding: 0.75rem 1.25rem;
	border-radius: 9999px;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	opacity: 0;
	pointer-events: none;
	transition: opacity 200ms ease, transform 200ms ease;
	z-index: 300;
}
.chatera-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ------------------------------------------------------------------
 * 12. Patterns (TL;DR, FAQ, HowTo)
 * ------------------------------------------------------------------ */
.tldr-callout {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-left: 3px solid var(--wp--preset--color--accent);
	border-radius: var(--chatera-radius);
	padding: 1.25rem 1.5rem;
	margin-block: 1.5rem;
}
.tldr-callout__label {
	display: inline-block;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.5rem;
}
.tldr-callout ul, .tldr-callout ol { margin: 0; padding-left: 1.25rem; }
.tldr-callout li { margin-block: 0.35rem; }

.chatera-faq {
	margin-block: 2rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.chatera-faq details {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--chatera-radius);
	padding: 1rem 1.25rem;
	background: var(--wp--preset--color--surface);
}
.chatera-faq details[open] {
	border-color: var(--wp--preset--color--accent);
}
.chatera-faq summary {
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}
.chatera-faq summary::-webkit-details-marker { display: none; }
.chatera-faq summary::after {
	content: "+";
	font-size: 1.25rem;
	color: var(--wp--preset--color--text-muted);
	transition: transform var(--chatera-transition);
}
.chatera-faq details[open] summary::after {
	content: "−";
}
.chatera-faq p, .chatera-faq div[itemprop="text"] {
	margin-block: 0.75rem 0;
	color: var(--wp--preset--color--text-muted);
	line-height: 1.5;
}

.chatera-howto {
	counter-reset: chatera-step;
	margin-block: 2rem;
	padding-left: 0;
	list-style: none;
}
.chatera-howto > li {
	position: relative;
	counter-increment: chatera-step;
	padding: 1rem 1.25rem 1rem 3.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--chatera-radius);
	margin-block: 0.75rem;
	background: var(--wp--preset--color--background);
}
.chatera-howto > li::before {
	content: counter(chatera-step);
	position: absolute;
	left: 1rem;
	top: 1rem;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 9999px;
	background: var(--wp--preset--color--accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--sm);
}

/* ------------------------------------------------------------------
 * 13. Related posts
 * ------------------------------------------------------------------ */
.chatera-related {
	margin-top: clamp(2.5rem, 5vw, 4rem);
	padding-top: 2rem;
	border-top: 1px solid var(--wp--preset--color--border);
	max-width: none;
	width: 100%;
}
.chatera-single .chatera-related > *,
.chatera-single .chatera-related .chatera-grid,
.chatera-single .chatera-related .wp-block-query,
.chatera-single .chatera-related .wp-block-post-template {
	max-width: none;
	width: 100%;
}
.chatera-single .chatera-related .chatera-grid,
.chatera-single .chatera-related .wp-block-post-template {
	gap: clamp(0.75rem, 1.2vw, 1rem) !important;
}
.chatera-single .chatera-related .wp-block-post {
	padding: 1rem 1.125rem 1.125rem;
	gap: 0.625rem;
}
.chatera-related__heading {
	font-size: clamp(1.25rem, 0.8vw + 1.05rem, 1.625rem);
	font-weight: 700;
	margin-bottom: 1.5rem;
	letter-spacing: -0.02em;
	line-height: 1.5;
}

/* ------------------------------------------------------------------
 * 14. Search overlay (header)
 * ------------------------------------------------------------------ */
.chatera-search-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 9999px;
	border: 1px solid var(--wp--preset--color--border);
	background: transparent;
	color: var(--wp--preset--color--text);
	cursor: pointer;
}

/* ------------------------------------------------------------------
 * 15. Footer — SaaS startup style
 * ------------------------------------------------------------------ */
.chatera-footer {
	position: relative;
	margin-top: clamp(4rem, 8vw, 7rem);
	padding-block: clamp(3rem, 6vw, 5rem) 2rem;
	color: var(--wp--preset--color--text-muted);
	font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
	background:
		radial-gradient(1200px 400px at 50% -200px, color-mix(in srgb, var(--wp--preset--color--accent) 8%, transparent), transparent 70%),
		linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--wp--preset--color--surface) 40%, transparent) 100%);
	border-top: 1px solid var(--wp--preset--color--border);
}
.chatera-footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: min(80%, 600px);
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--wp--preset--color--accent), transparent);
	opacity: 0.4;
}

.chatera-footer__top {
	display: grid;
	grid-template-columns: 1.3fr 3fr;
	gap: clamp(2rem, 4vw, 4rem);
	padding-bottom: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 900px) {
	.chatera-footer__top { grid-template-columns: 1fr; }
}

.chatera-footer__brand {
	max-width: 400px;
}
.chatera-footer__brand p {
	font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
	line-height: 1.5;
}
.chatera-footer__brand .wp-block-site-logo {
	display: flex !important;
	align-items: center;
	line-height: 0;
	width: auto !important;
	max-width: none !important;
	height: auto !important;
	margin-left: -0.375rem;
}
.chatera-footer__brand .custom-logo-link {
	display: inline-flex;
	align-items: center;
	width: auto !important;
	height: auto !important;
	max-width: none !important;
}
.chatera-footer__brand .wp-block-site-logo img,
.chatera-footer__brand .wp-block-site-logo .custom-logo {
	width: auto !important;
	max-width: none !important;
	height: 32px !important;
	max-height: 32px !important;
	object-fit: contain;
	display: block;
	margin-left: 0;
}
.chatera-footer__brand .wp-block-site-title a {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.chatera-footer__status {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.25rem;
	padding: 0.4rem 0.75rem;
	background: color-mix(in srgb, #10b981 14%, transparent);
	color: #065f46;
	font-size: 0.8125rem;
	font-weight: 500;
	border-radius: 9999px;
	border: 1px solid color-mix(in srgb, #10b981 30%, transparent);
}
html[data-theme="dark"] .chatera-footer__status {
	color: #6ee7b7;
	background: color-mix(in srgb, #10b981 18%, transparent);
}
.chatera-footer__status-dot {
	width: 8px;
	height: 8px;
	border-radius: 9999px;
	background: #10b981;
	position: relative;
	flex-shrink: 0;
}
.chatera-footer__status-dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 9999px;
	background: #10b981;
	animation: chatera-pulse 2s ease-out infinite;
}
@keyframes chatera-pulse {
	0%   { transform: scale(1); opacity: 0.7; }
	100% { transform: scale(2.6); opacity: 0; }
}

.chatera-footer__social {
	gap: 0.5rem !important;
	align-items: center;
}
.chatera-footer__social .wp-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 9999px;
	border: 1px solid var(--wp--preset--color--border);
	background: transparent;
	overflow: hidden;
	transition: border-color var(--chatera-transition), color var(--chatera-transition), transform var(--chatera-transition);
}
.chatera-footer__social .wp-social-link a,
.chatera-footer__social .wp-social-link .wp-block-social-link-anchor {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 0 !important;
	margin: 0 !important;
	color: inherit !important;
	line-height: 1;
}
.chatera-footer__social .wp-social-link svg {
	width: 16px;
	height: 16px;
	display: block;
	fill: currentColor;
}
.chatera-footer__social .wp-social-link:hover {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent) !important;
	transform: translateY(-2px);
}

.chatera-footer__cols {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
}
@media (max-width: 720px)  { .chatera-footer__cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px)  { .chatera-footer__cols { grid-template-columns: 1fr; } }

.chatera-footer__col { display: flex; flex-direction: column; gap: 0.75rem; }

:where(.chatera-footer__heading) {
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--chatera-heading);
	margin: 0 0 0.875rem;
	font-family: var(--wp--preset--font-family--inter);
	line-height: 1.5;
}

.chatera-footer__list,
.chatera-footer__nav .chatera-nav__list {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}
.chatera-footer__list li,
.chatera-footer__nav .menu-item { margin: 0 !important; }
.chatera-footer__list a,
.chatera-footer__nav .menu-item > a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
	padding: 0;
	background: transparent;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	transition: color var(--chatera-transition);
	font-weight: 400;
	line-height: 1.5;
}
.chatera-footer__list a:hover,
.chatera-footer__nav .menu-item > a:hover {
	color: var(--wp--preset--color--accent);
	background: transparent;
}
.chatera-footer__nav .menu-item-has-children > a::after { display: none; }
.chatera-footer__nav .sub-menu {
	list-style: none;
	padding: 0 0 0 0.75rem;
	margin: 0.35rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	border-left: 1px solid var(--wp--preset--color--border);
}
.chatera-footer__nav .sub-menu a { font-size: clamp(1rem, 0.25vw + 0.95rem, 1.125rem); }

.chatera-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.1rem 0.45rem;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 9999px;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 14%, transparent);
	color: var(--wp--preset--color--accent);
	line-height: 1.4;
}
.chatera-badge--new {
	background: color-mix(in srgb, #10b981 14%, transparent);
	color: #10b981;
}

.chatera-footer__bottom {
	padding-top: 2rem;
	border-top: 1px solid var(--wp--preset--color--border);
	gap: 1rem !important;
}
.chatera-footer__meta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--text-muted);
}
.chatera-footer__meta .sep { opacity: 0.5; }

/* ------------------------------------------------------------------
 * 16. Utilities
 * ------------------------------------------------------------------ */
.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border: 0;
}
.line-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.line-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Images smooth fallback */
img { max-width: 100%; height: auto; }

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

/* ------------------------------------------------------------------
 * 16. Search page
 * ------------------------------------------------------------------ */
.chatera-search__heading {
	margin-block: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 2vw, 2rem);
}
.chatera-search__eyebrow {
	display: inline-block;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.75rem;
}
.chatera-search__title,
h1.chatera-search__title,
.wp-block-query-title.chatera-search__title {
	font-size: clamp(1.375rem, 0.6vw + 1.125rem, 1.75rem);
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.25;
	color: var(--wp--preset--color--text);
	margin: 0 0 0.75rem;
}
.chatera-search__dek {
	font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.25rem);
	color: var(--wp--preset--color--text-muted);
	max-width: 60ch;
	margin: 0 0 1.5rem;
	line-height: 1.55;
}
.chatera-search__heading .wp-block-search { margin: 0; }
.chatera-search__heading .wp-block-search__inside-wrapper {
	max-width: 560px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 9999px;
	padding: 0.25rem;
	background: var(--wp--preset--color--background);
	transition: border-color .2s, box-shadow .2s;
}
.chatera-search__heading .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--accent) 15%, transparent);
}
.chatera-search__heading .wp-block-search__input {
	border: 0;
	background: transparent;
	padding: 0.5rem 0.875rem;
	font-size: 1rem;
}
.chatera-search__heading .wp-block-search__input:focus { outline: none; box-shadow: none; }

.chatera-search__empty {
	grid-column: 1 / -1;
	padding: clamp(2rem, 4vw, 3rem);
	text-align: center;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.625rem;
	margin-block: 0.5rem 2rem;
}
.chatera-search__empty-icon {
	display: block;
	width: 64px;
	height: 64px;
	margin: 0 auto 1rem;
	color: var(--wp--preset--color--accent);
}
.chatera-search__empty h2 {
	font-size: clamp(1.375rem, 0.8vw + 1rem, 1.625rem);
	font-weight: 700;
	letter-spacing: -0.015em;
	margin: 0 0 0.5rem;
}
.chatera-search__empty p {
	color: var(--wp--preset--color--text-muted);
	margin: 0 auto 1rem;
	max-width: 48ch;
}
.chatera-search__empty ul {
	list-style: none;
	padding: 0;
	margin: 0 auto;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}
.chatera-search__empty li {
	font-size: var(--wp--preset--font-size--sm);
	padding: 0.375rem 0.75rem;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--text);
	border-radius: 9999px;
}

/* ------------------------------------------------------------------
 * 17. 404 page — full-screen, no header/footer
 * ------------------------------------------------------------------ */
.chatera-404-wrap {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(2rem, 5vw, 4rem) 1.25rem;
	background:
		radial-gradient(900px 500px at 50% -10%, color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent), transparent 70%),
		var(--wp--preset--color--background);
}
.chatera-404 {
	text-align: center;
	width: 100%;
	max-width: 640px;
}
.chatera-404 > * + * { margin-top: 1.25rem; }

.chatera-404__logo {
	display: block;
	margin: 0 auto 0.5rem !important;
	opacity: 0.9;
}
.chatera-404__logo .custom-logo-link,
.chatera-404__logo img {
	display: inline-block !important;
	width: auto !important;
	height: 32px !important;
	max-width: none !important;
}

.chatera-404__code {
	display: block;
	font-size: clamp(4rem, 10vw + 1rem, 7rem);
	font-weight: 800;
	letter-spacing: -0.05em;
	line-height: 1;
	margin: 0 !important;
	background: linear-gradient(180deg, var(--wp--preset--color--accent) 0%, color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.chatera-404__title {
	font-size: clamp(1.625rem, 1.5vw + 1rem, 2.25rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 2.25rem 0 0 !important;
}

.chatera-404__dek {
	max-width: 52ch;
	margin: 0.75rem auto 0 !important;
	color: var(--wp--preset--color--text-muted);
	font-size: clamp(1rem, 0.3vw + 0.95rem, 1.125rem);
	line-height: 1.55;
}

.chatera-404__search {
	margin: 2.5rem auto 0 !important;
	max-width: 480px;
}
.chatera-404 .wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 9999px;
	padding: 0.25rem;
	background: var(--wp--preset--color--background);
	transition: border-color .2s, box-shadow .2s;
}
.chatera-404 .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--accent) 15%, transparent);
}
.chatera-404 .wp-block-search__input { border: 0; background: transparent; padding: 0.5rem 0.875rem; font-size: 1rem; }
.chatera-404 .wp-block-search__input:focus { outline: none; box-shadow: none; }

/* ============================================================
   Author Bio block — kartu E-E-A-T (single + author archive)
   ============================================================ */
.chatera-author-bio {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1.25rem;
	padding: 1.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--chatera-radius-lg, 16px);
	background:
		radial-gradient(70% 100% at 0% 0%, color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent), transparent 65%),
		var(--wp--preset--color--surface);
	overflow: hidden;
}
.chatera-author-bio.chatera-single__author-card {
	margin-block: 2rem 2.5rem;
}
.chatera-author-bio::after {
	content: "";
	position: absolute;
	inset: auto -40px -60px auto;
	width: 220px;
	height: 220px;
	border-radius: 9999px;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent), transparent);
	pointer-events: none;
}
.chatera-author-bio__avatar {
	position: relative;
	line-height: 0;
}
.chatera-author-bio__avatar-img {
	display: block;
	width: 88px;
	height: 88px;
	border-radius: 9999px;
	object-fit: cover;
	box-shadow: 0 0 0 3px var(--wp--preset--color--surface),
	            0 0 0 4px color-mix(in srgb, var(--wp--preset--color--accent) 70%, transparent);
}
.chatera-author-bio__content {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
}
.chatera-author-bio__header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.625rem;
}
.chatera-author-bio__byline {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.6rem;
	border-radius: 9999px;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 14%, transparent);
	color: var(--wp--preset--color--accent);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1;
}
.chatera-author-bio__name {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.018em;
	color: var(--wp--preset--color--text);
	line-height: 1.4;
}
.chatera-author-bio__name a {
	color: inherit;
	text-decoration: none;
}
.chatera-author-bio__name a:hover {
	color: var(--wp--preset--color--accent);
}
.chatera-author-bio__role {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--text-muted);
}
.chatera-author-bio__role-sep {
	margin-inline: 0.25rem;
	opacity: 0.6;
}
.chatera-author-bio__desc {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--wp--preset--color--text-muted);
}
.chatera-author-bio__expertise {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.25rem 0 0;
	padding: 0;
	list-style: none;
}
.chatera-author-bio__chip {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.625rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 9999px;
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--text);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1;
}
.chatera-author-bio__social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.875rem;
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
}
.chatera-author-bio__social a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 600;
	border-bottom: 1px dashed color-mix(in srgb, var(--wp--preset--color--accent) 35%, transparent);
	padding-bottom: 1px;
	transition: color .15s, border-color .15s;
}
.chatera-author-bio__social a:hover {
	color: var(--wp--preset--color--text);
	border-color: var(--wp--preset--color--text);
}

/* Author archive page wrapper */
.chatera-author .chatera-author__bio {
	margin-top: 1.5rem;
}

/* ============================================================
   Logo dark mode — paksa semua warna jadi putih solid.
   brightness(0) → semua channel jadi hitam, invert(1) → flip ke putih.
   Alpha/anti-aliasing tetap dihormati.
   ============================================================ */
[data-theme="dark"] .wp-block-site-logo img {
	filter: brightness(0) invert(1);
}

@media (max-width: 640px) {
	.chatera-author-bio {
		grid-template-columns: 1fr;
		padding: 1.25rem;
		gap: 1rem;
	}
	.chatera-author-bio__avatar-img {
		width: 72px;
		height: 72px;
	}
}

/* ------------------------------------------------------------------
 * Pagination — modern pill style
 *    Numbers as rounded pills, prev/next as outlined buttons with
 *    arrow icons. Current page highlighted with accent.
 * ------------------------------------------------------------------ */
.chatera-pagination.wp-block-query-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	margin-top: 3rem;
	font-size: var(--wp--preset--font-size--sm);
	font-feature-settings: "tnum" 1;
}

/* Pagination harus span semua kolom saat berada di dalam grid layout */
.chatera-grid > .chatera-pagination,
.chatera-grid > nav.wp-block-query-pagination {
	grid-column: 1 / -1;
}

.chatera-pagination .wp-block-query-pagination-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
}

.chatera-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.7rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.625rem;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: color var(--chatera-transition),
	            border-color var(--chatera-transition),
	            background var(--chatera-transition),
	            transform var(--chatera-transition);
}

.chatera-pagination a.page-numbers:hover,
.chatera-pagination .wp-block-query-pagination-previous:hover,
.chatera-pagination .wp-block-query-pagination-next:hover {
	color: var(--wp--preset--color--accent);
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 55%, transparent);
	background: color-mix(in srgb, var(--wp--preset--color--accent) 8%, var(--wp--preset--color--surface));
	transform: translateY(-1px);
}

.chatera-pagination a.page-numbers:focus-visible,
.chatera-pagination .wp-block-query-pagination-previous:focus-visible,
.chatera-pagination .wp-block-query-pagination-next:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.chatera-pagination .page-numbers.current {
	color: var(--wp--preset--color--on-primary, #fff);
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	cursor: default;
}

.chatera-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	color: var(--wp--preset--color--text-muted);
	min-width: 1.5rem;
	padding: 0 0.25rem;
	letter-spacing: 0.1em;
}

.chatera-pagination .wp-block-query-pagination-previous,
.chatera-pagination .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	height: 2.25rem;
	padding: 0 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.625rem;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	margin: 0;
	transition: color var(--chatera-transition),
	            border-color var(--chatera-transition),
	            background var(--chatera-transition),
	            transform var(--chatera-transition);
}

.chatera-pagination .wp-block-query-pagination-previous-arrow,
.chatera-pagination .wp-block-query-pagination-next-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05em;
	line-height: 1;
	margin: 0 !important;
}

.chatera-pagination .wp-block-query-pagination-previous[aria-disabled="true"],
.chatera-pagination .wp-block-query-pagination-next[aria-disabled="true"] {
	opacity: 0.45;
	pointer-events: none;
	cursor: not-allowed;
}

@media (max-width: 600px) {
	.chatera-pagination.wp-block-query-pagination {
		gap: 0.3rem;
	}
	.chatera-pagination .page-numbers {
		min-width: 2rem;
		height: 2rem;
		padding: 0 0.55rem;
		font-size: 0.875rem;
	}
	.chatera-pagination .wp-block-query-pagination-previous,
	.chatera-pagination .wp-block-query-pagination-next {
		height: 2rem;
		padding: 0 0.7rem;
		font-size: 0.875rem;
	}
}

/* Skip-to-content link (a11y). Visible only on focus. */
.chatera-skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.chatera-skip-link:focus {
	position: fixed;
	left: 1rem;
	top: 1rem;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
	font-weight: 600;
	text-decoration: none;
	border-radius: 0.5rem;
	box-shadow: var(--wp--preset--shadow--md);
	z-index: 100000;
}

