/*
Theme Name: AniChronicle Plus
Template: anichronicle-theme
Description: Reader-experience upgrades for AniChronicle: clearer homepage, guided start paths, colour-coded series, reading time, progress bar and read-next.
Version: 1.0.5
Author: AniChronicle
Text Domain: anichronicle
*/

:root {
	--acp-cyan: #00e5ff;
	--acp-pink: #ff2e88;
	--acp-card: #161925;
	--acp-line: #262b40;
	--acp-muted: #a9adc4;
}

/* ---------- Shared ---------- */
.acp-section-title {
	font-size: 1.35rem;
	font-weight: 800;
	margin: 0 0 16px;
	letter-spacing: -0.01em;
}
.acp-pill {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #fff !important;
	text-decoration: none !important;
	background: color-mix(in srgb, var(--acp-a) 30%, transparent);
	border: 1px solid color-mix(in srgb, var(--acp-a) 70%, transparent);
}
.acp-pill:hover { background: color-mix(in srgb, var(--acp-a) 50%, transparent); }


/* ---------- Header logo ---------- */
.site-branding a { display: inline-flex; align-items: center; gap: 12px; }
.site-branding a::before {
	content: "";
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border-radius: 50%;
	background: #0b0b12 url(/wp-content/uploads/2026/12/anichronicle-logo-184.jpg) center / cover no-repeat;
	box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.35), 0 0 16px rgba(0, 229, 255, 0.25);
}
@media (max-width: 600px) { .site-branding a::before { width: 34px; height: 34px; flex-basis: 34px; } }

/* ---------- Hero ---------- */
.acp-hero {
	max-width: 1200px;
	margin: 0 auto 36px;
	padding: 48px 20px 8px;
	box-sizing: border-box;
}
.acp-kicker {
	margin: 0 0 10px;
	color: var(--acp-cyan);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.acp-hero-title {
	margin: 0 0 14px;
	font-size: clamp(2rem, 5vw, 3.4rem);
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.02em;
	max-width: 900px;
}
.acp-hero-title span {
	display: block;
	background: linear-gradient(90deg, var(--acp-cyan), var(--acp-pink));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.acp-hero-lead {
	max-width: 680px;
	margin: 0 0 22px;
	font-size: 1.1rem;
	line-height: 1.6;
	color: var(--acp-muted);
}
.acp-search {
	display: flex;
	max-width: 620px;
	background: var(--acp-card);
	border: 1px solid var(--acp-line);
	border-radius: 14px;
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.acp-search:focus-within {
	border-color: var(--acp-cyan);
	box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.15);
}
.acp-search input {
	flex: 1;
	min-width: 0;
	padding: 15px 18px;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 1rem;
	outline: none;
}
.acp-search button {
	padding: 0 22px;
	border: 0;
	background: linear-gradient(90deg, var(--acp-cyan), #4f8bff);
	color: #061018;
	font-weight: 800;
	font-size: 0.95rem;
	cursor: pointer;
}
.acp-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
	color: var(--acp-muted);
	font-size: 0.9rem;
}
.acp-trust span { color: var(--acp-cyan); font-weight: 800; }

/* ---------- Start-here paths ---------- */
.acp-paths,
.acp-hubs {
	max-width: 1200px;
	margin: 0 auto 40px;
	padding: 0 20px;
	box-sizing: border-box;
}
.acp-path-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}
.acp-path {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px 20px 18px;
	border-radius: 14px;
	background: linear-gradient(160deg, color-mix(in srgb, var(--acp-a) 18%, var(--acp-card)), var(--acp-card) 70%);
	border: 1px solid color-mix(in srgb, var(--acp-a) 40%, var(--acp-line));
	color: #fff !important;
	text-decoration: none !important;
	transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.acp-path:hover {
	transform: translateY(-3px);
	border-color: var(--acp-a);
	box-shadow: 0 10px 30px color-mix(in srgb, var(--acp-a) 25%, transparent);
}
.acp-path-kick { color: var(--acp-a); font-size: 0.85rem; font-weight: 700; }
.acp-path-label { font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.acp-path-time { margin-top: 6px; color: var(--acp-muted); font-size: 0.85rem; }

/* ---------- Series hubs ---------- */
.acp-hub-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.acp-hub {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	box-sizing: border-box;
	padding: 16px 16px 14px;
	border-radius: 12px;
	background: var(--acp-card);
	border: 1px solid var(--acp-line);
	border-top: 3px solid var(--acp-a);
	color: #fff !important;
	text-decoration: none !important;
	transition: transform 0.2s, box-shadow 0.2s;
}
.acp-hub:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px color-mix(in srgb, var(--acp-a) 22%, transparent);
}
.acp-hub-name { font-weight: 800; font-size: 1.05rem; }
.acp-hub-count { color: var(--acp-b); font-size: 0.82rem; font-weight: 700; }
.acp-hub-latest { margin-top: 4px; color: var(--acp-muted); font-size: 0.8rem; line-height: 1.4; }

/* ---------- Article cards ---------- */
.acp-card { position: relative; }
.acp-card:hover { transform: translateY(-2px); border-color: #3a4166; }
.acp-card-thumb { position: relative; overflow: hidden; }
.acp-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acp-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 9px;
	border-radius: 6px;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #061018;
}
.acp-badge-new { background: var(--acp-cyan); }
.acp-badge-updated { background: #ffd24a; }
.acp-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: var(--acp-muted);
	font-size: 0.8rem;
	margin-bottom: 6px;
}
.acp-more { font-weight: 700; }


/* Card layout: image left, text right on wide screens */
.acp-card { flex-direction: row !important; align-items: stretch; }
.acp-card .acp-card-thumb { width: 40% !important; min-width: 0 !important; flex: 0 0 40%; }
.acp-card { align-items: center; }
.acp-card .acp-card-thumb { align-self: stretch; display: flex; align-items: center; background: #0d0f18; }
.acp-card .acp-card-thumb img { aspect-ratio: 1200 / 630; height: auto; object-fit: contain; }
.acp-card .acp-card-body { flex: 1; min-width: 0; padding: 16px 18px; }
.acp-card .post-card-title, .acp-card .post-card-excerpt { max-width: none; }
@media (max-width: 700px) {
	.acp-card { flex-direction: column !important; }
	.acp-card .acp-card-thumb { width: 100% !important; flex-basis: auto; }
}

/* ---------- Single article ---------- */
.acp-single {
	display: grid;
	grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
	gap: 40px;
	max-width: 1200px;
	margin: 36px auto 50px;
	padding: 0 20px;
	box-sizing: border-box;
}
.acp-single .single-article-layout { margin: 0; max-width: 100%; }
.acp-single .article-sidebar-wrapper { position: sticky; top: 20px; align-self: start; }
.acp-single .article-sidebar-wrapper .front-page-sidebar { width: 100%; }
.acp-article-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: var(--acp-muted);
	font-size: 0.88rem;
}
.acp-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	z-index: 99999;
	transform: scaleX(0);
	transform-origin: 0 50%;
	background: linear-gradient(90deg, var(--acp-cyan), var(--acp-pink));
	pointer-events: none;
}
.admin-bar .acp-progress { top: 32px; }

/* Article body readability */
.acp-single .entry-content { font-size: 1.06rem; line-height: 1.75; }
.acp-single .entry-content h2 { margin-top: 2.2em; }
.acp-single .entry-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.95rem; display: block; overflow-x: auto; }
.acp-single .entry-content th,
.acp-single .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--acp-line); text-align: left; vertical-align: top; }
.acp-single .entry-content th { color: var(--acp-cyan); white-space: nowrap; }
.acp-single .entry-content .ac-quick-answer {
	margin: 0 0 1.6em;
	padding: 16px 20px;
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(0, 229, 255, 0.10), rgba(255, 46, 136, 0.08));
	border: 1px solid rgba(0, 229, 255, 0.35);
}
.acp-single .entry-content .ac-quick-answer p { margin: 0; }
.acp-single .entry-content .ac-sources { color: var(--acp-muted); }

/* Read next + follow */
.acp-next { margin: 44px 0 24px; }
.acp-next-title { font-size: 1.3rem; margin: 0 0 14px; }
.acp-next-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.acp-next-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-bottom: 14px;
	border-radius: 12px;
	overflow: hidden;
	background: var(--acp-card);
	border: 1px solid var(--acp-line);
	color: #fff !important;
	text-decoration: none !important;
	transition: transform 0.2s, border-color 0.2s;
}
.acp-next-card:hover { transform: translateY(-2px); border-color: var(--acp-cyan); }
.acp-next-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; display: block; }
.acp-next-name { padding: 6px 14px 0; font-weight: 800; line-height: 1.35; }
.acp-next-time { padding: 0 14px; color: var(--acp-muted); font-size: 0.85rem; }
.acp-follow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 24px;
	padding: 18px 20px;
	border-radius: 12px;
	background: var(--acp-card);
	border: 1px dashed #3a4166;
}
.acp-follow p { margin: 0; }
.acp-follow-btn {
	padding: 10px 18px;
	border-radius: 10px;
	background: #1877f2;
	color: #fff !important;
	font-weight: 800;
	text-decoration: none !important;
	white-space: nowrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.acp-single { grid-template-columns: 1fr; }
	.acp-single .article-sidebar-wrapper { position: static; }
	.acp-path-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.acp-hero, .acp-paths, .acp-hubs, .front-page-layout { padding-left: 4px; padding-right: 4px; }
	.acp-single { padding: 0 4px; margin-top: 20px; }
	.acp-hero { padding-top: 20px; margin-bottom: 28px; }
	.acp-trust { gap: 6px 16px; font-size: 0.85rem; }
	.acp-hero-lead { font-size: 1rem; }
	.acp-search button { padding: 0 16px; }
	.acp-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.acp-next-grid { grid-template-columns: 1fr; }
	.front-page-post-card { flex-direction: column; }
	.front-page-post-card .post-card-thumbnail { width: 100%; min-width: 0; }

	/* Compact cookie banner on phones so it doesn't cover half the screen. */
	.cky-consent-container { width: auto !important; left: 10px !important; right: 10px !important; bottom: 10px !important; }
	.cky-consent-container .cky-consent-bar { padding: 12px 14px !important; }
	.cky-consent-container .cky-title { font-size: 14px !important; margin-bottom: 4px !important; }
	.cky-consent-container .cky-notice-des,
	.cky-consent-container .cky-notice-des p { font-size: 12px !important; line-height: 1.4 !important; }
	.cky-consent-container .cky-notice-btn-wrapper { margin-top: 8px !important; }
	.cky-consent-container .cky-notice-btn-wrapper { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 6px !important; }
	.cky-consent-container .cky-notice-btn-wrapper .cky-btn { flex: 1 1 0 !important; width: auto !important; margin: 0 !important; padding: 8px 4px !important; font-size: 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.acp-path, .acp-hub, .acp-card, .acp-next-card { transition: none; }
	.acp-path:hover, .acp-hub:hover, .acp-card:hover, .acp-next-card:hover { transform: none; }
}
