/*
Theme Name: Asian Pulse
Theme URI: https://asian-pulse.com
Author: Sajjad Hossain
Description: Professional news theme for Asian-Pulse.com – "Where Every Story Matters". Broadsheet masthead with the Asian Pulse logo, breaking-news ticker, category-driven front page, 13 advertisement slots, NewsArticle schema, most-read widget and full Customizer support. Comments are disabled on news posts.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chronicle
Tags: news, blog, newspaper, magazine, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	/* Brand: Asian Pulse logo red + near-black */
	--c-ink: #0f1015;
	--c-text: #2a2b30;
	--c-muted: #6b6d74;
	--c-rule: #e1e1e4;
	--c-rule-strong: #0f1015;
	--c-paper: #ffffff;
	--c-paper-alt: #f5f5f6;
	--c-accent: #dd1613;
	--c-accent-dark: #b0100e;
	--c-accent-ink: #ffffff;
	--c-link-hover: #dd1613;

	--f-display: "Playfair Display", Georgia, "Times New Roman", serif;
	--f-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

	--w-max: 1240px;
	--gutter: 24px;
	--radius: 2px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--c-paper);
	color: var(--c-text);
	font-family: var(--f-serif);
	font-size: 18px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color .15s ease; }
a:hover, a:focus { color: var(--c-link-hover); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--f-display);
	color: var(--c-ink);
	line-height: 1.2;
	margin: 0 0 .5em;
	font-weight: 700;
}

p { margin: 0 0 1.2em; }

hr { border: 0; border-top: 1px solid var(--c-rule); margin: 2em 0; }

blockquote {
	margin: 1.5em 0;
	padding: .25em 0 .25em 1.25em;
	border-left: 4px solid var(--c-accent);
	font-family: var(--f-display);
	font-size: 1.35em;
	font-style: italic;
	color: var(--c-ink);
}

table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; font-family: var(--f-sans); font-size: .9em; }
th, td { border-bottom: 1px solid var(--c-rule); padding: .6em; text-align: left; }
th { background: var(--c-paper-alt); }

code, pre { font-family: Consolas, Monaco, monospace; font-size: .85em; }
pre { background: var(--c-paper-alt); padding: 1em; overflow-x: auto; }

input, textarea, select, button { font: inherit; }

input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], textarea {
	width: 100%;
	padding: .65em .8em;
	border: 1px solid var(--c-rule);
	border-radius: var(--radius);
	background: #fff;
	font-family: var(--f-sans);
	font-size: 15px;
}
input:focus, textarea:focus { outline: 2px solid var(--c-ink); outline-offset: -1px; }

button, .button, input[type="submit"] {
	display: inline-block;
	padding: .65em 1.2em;
	border: 0;
	border-radius: var(--radius);
	background: var(--c-ink);
	color: #fff;
	font-family: var(--f-sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
	cursor: pointer;
}
button:hover, .button:hover, input[type="submit"]:hover { background: var(--c-accent); color: #fff; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000;
	width: auto; height: auto; clip: auto;
	padding: 10px 16px; background: #fff; color: var(--c-ink);
	font-family: var(--f-sans); font-weight: 600;
}

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

/* ==========================================================================
   3. Top bar
   ========================================================================== */
.topbar {
	background: var(--c-ink);
	color: #e8e8e8;
	font-family: var(--f-sans);
	font-size: 12.5px;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar a { color: #e8e8e8; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar-menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.topbar-social { display: flex; gap: 14px; }
.topbar-social svg { width: 14px; height: 14px; fill: currentColor; display: block; }

/* ==========================================================================
   4. Masthead
   ========================================================================== */
.masthead { padding: 22px 0 14px; border-bottom: 1px solid var(--c-rule); }
.masthead-inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 20px;
}
.masthead-meta { font-family: var(--f-sans); font-size: 12.5px; color: var(--c-muted); line-height: 1.5; }
.masthead-meta strong { display: block; color: var(--c-ink); font-weight: 600; }
.masthead-right { text-align: right; }

.site-branding { text-align: center; }
.site-title {
	font-family: var(--f-display);
	font-size: clamp(2.2rem, 5.5vw, 4.25rem);
	font-weight: 900;
	letter-spacing: -.01em;
	line-height: 1;
	margin: 0;
	color: var(--c-ink);
}
.site-title a:hover { color: var(--c-ink); }
.site-description {
	margin: 8px 0 0;
	font-family: var(--f-serif);
	font-style: italic;
	font-size: 14px;
	color: var(--c-muted);
}
.custom-logo-link { display: inline-block; }
.custom-logo-link img { max-height: 78px; width: auto; margin: 0 auto; }

.btn-subscribe {
	display: inline-block;
	padding: 8px 16px;
	background: var(--c-accent);
	color: var(--c-accent-ink);
	font-family: var(--f-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	border-radius: var(--radius);
}
.btn-subscribe:hover { background: var(--c-accent-dark); color: #fff; }

/* ==========================================================================
   5. Primary navigation
   ========================================================================== */
.site-nav {
	background: var(--c-paper);
	border-bottom: 3px solid var(--c-accent);
	position: relative;
	z-index: 50;
}
.site-nav.is-stuck { position: sticky; top: 0; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.admin-bar .site-nav.is-stuck { top: 32px; }
.site-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.primary-menu, .primary-menu ul { list-style: none; margin: 0; padding: 0; }
.primary-menu { display: flex; flex-wrap: wrap; justify-content: center; flex: 1; }
.primary-menu > li { position: relative; }
.primary-menu a {
	display: block;
	padding: 13px 14px;
	font-family: var(--f-sans);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--c-ink);
}
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-category-ancestor > a,
.primary-menu > li > a:hover { color: var(--c-accent); box-shadow: inset 0 -3px 0 var(--c-accent); }

.primary-menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px;
	background: #fff; border: 1px solid var(--c-rule); border-top: 3px solid var(--c-accent);
	box-shadow: 0 8px 20px rgba(0,0,0,.08);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: all .15s ease; z-index: 60;
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-menu .sub-menu a { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 14px; padding: 9px 14px; border-bottom: 1px solid #f0f0f0; }
.primary-menu .sub-menu .sub-menu { top: 0; left: 100%; }

.nav-btn {
	background: transparent; color: var(--c-ink);
	padding: 10px; display: inline-flex; align-items: center; justify-content: center;
}
.nav-btn:hover { background: transparent; color: var(--c-accent); }
.nav-btn svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }

.search-panel {
	display: none;
	border-top: 1px solid var(--c-rule);
	padding: 14px 0;
	background: var(--c-paper-alt);
}
.search-panel.is-open { display: block; }

.search-form { display: flex; gap: 0; }
.search-form label { flex: 1; }
.search-form .search-field { border-radius: var(--radius) 0 0 var(--radius); }
.search-form .search-submit { border-radius: 0 var(--radius) var(--radius) 0; }

/* ==========================================================================
   6. Breaking news ticker
   ========================================================================== */
.ticker {
	border-bottom: 1px solid var(--c-rule);
	font-family: var(--f-sans);
	font-size: 14px;
	background: #fff;
}
.ticker .container { display: flex; align-items: stretch; gap: 0; }
.ticker-label {
	flex-shrink: 0;
	display: flex; align-items: center; gap: 8px;
	padding: 9px 14px;
	background: var(--c-accent);
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.ticker-label .dot {
	width: 8px; height: 8px; border-radius: 50%; background: #fff;
	animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.ticker-track { overflow: hidden; flex: 1; position: relative; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ticker-list {
	display: flex; gap: 48px; list-style: none; margin: 0; padding: 9px 0 9px 24px;
	white-space: nowrap; width: max-content;
	animation: ticker 45s linear infinite;
}
.ticker:hover .ticker-list { animation-play-state: paused; }
.ticker-list li::before { content: "\25A0"; color: var(--c-accent); font-size: 8px; margin-right: 10px; vertical-align: middle; }
.ticker-list a { font-weight: 500; color: var(--c-ink); }
.ticker-list a:hover { color: var(--c-accent); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-list { animation: none; } }

/* ==========================================================================
   7. Shared story components
   ========================================================================== */
.site-main { padding: 28px 0 48px; }

.kicker {
	display: inline-block;
	font-family: var(--f-sans);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--c-accent);
	margin-bottom: 6px;
}
.kicker:hover { color: var(--c-ink); }

.story-meta {
	font-family: var(--f-sans);
	font-size: 12.5px;
	color: var(--c-muted);
	display: flex; flex-wrap: wrap; gap: 4px 12px;
}
.story-meta a { color: var(--c-ink); font-weight: 600; }
.story-meta .sep::before { content: "\00B7"; }

.story-title a:hover { color: var(--c-link-hover); }
.story-excerpt { color: var(--c-text); font-size: 16px; line-height: 1.55; margin: 0 0 8px; }

.story-thumb { display: block; overflow: hidden; background: var(--c-paper-alt); margin-bottom: 12px; position: relative; }
.story-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.story-thumb:hover img { transform: scale(1.03); }

.section-head {
	display: flex; align-items: baseline; justify-content: space-between;
	border-top: 3px solid var(--c-rule-strong);
	padding-top: 10px;
	margin-bottom: 20px;
}
.section-title {
	font-family: var(--f-sans);
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	margin: 0;
}
.section-more { font-family: var(--f-sans); font-size: 12.5px; font-weight: 600; color: var(--c-accent); }
.section-more::after { content: " \2192"; }

/* ==========================================================================
   8. Front page
   ========================================================================== */
.front-top {
	display: grid;
	grid-template-columns: 1fr 2fr 1fr;
	gap: 0;
	margin-bottom: 40px;
}
.front-top > * { padding: 0 20px; }
.front-top > *:first-child { padding-left: 0; }
.front-top > *:last-child { padding-right: 0; }
.front-top > * + * { border-left: 1px solid var(--c-rule); }

.lead-story .story-title { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
.lead-story .story-excerpt { font-size: 18px; }
.lead-story .story-thumb img { aspect-ratio: 16 / 10; }

.secondary-story { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--c-rule); }
.secondary-story:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.secondary-story .story-title { font-size: 1.25rem; }

.latest-list { list-style: none; margin: 0; padding: 0; counter-reset: latest; }
.latest-list li { padding: 12px 0; border-bottom: 1px solid var(--c-rule); }
.latest-list li:first-child { padding-top: 0; }
.latest-list li:last-child { border-bottom: 0; }
.latest-list time { display: block; font-family: var(--f-sans); font-size: 11.5px; font-weight: 700; color: var(--c-accent); margin-bottom: 3px; }
.latest-list a { font-family: var(--f-display); font-size: 1.02rem; font-weight: 700; line-height: 1.3; color: var(--c-ink); }
.latest-list a:hover { color: var(--c-link-hover); }

.front-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }

.cat-block { margin-bottom: 44px; }
.cat-block-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.cat-block-feature .story-title { font-size: 1.6rem; }
.cat-block-list { list-style: none; margin: 0; padding: 0; }
.cat-block-list li { display: grid; grid-template-columns: 1fr 96px; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--c-rule); align-items: start; }
.cat-block-list li:first-child { padding-top: 0; }
.cat-block-list li:last-child { border-bottom: 0; }
.cat-block-list .story-title { font-size: 1.02rem; margin: 0 0 4px; }
.cat-block-list img { aspect-ratio: 1 / 1; object-fit: cover; width: 96px; }

.cat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cat-row .story-title { font-size: 1.1rem; }

/* Opinion */
.opinion-block { background: var(--c-paper-alt); padding: 24px; margin-bottom: 44px; }
.opinion-block .section-head { border-top-color: var(--c-accent); }
.opinion-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.opinion-item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; }
.opinion-item img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; filter: grayscale(100%); }
.opinion-item .author { font-family: var(--f-sans); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-accent); }
.opinion-item .story-title { font-size: 1.1rem; font-style: italic; margin-top: 4px; }

/* ==========================================================================
   9. Archive / listing
   ========================================================================== */
.content-area { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }

.archive-header { border-bottom: 3px double var(--c-rule-strong); padding-bottom: 14px; margin-bottom: 28px; }
.archive-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.archive-description { color: var(--c-muted); margin-top: 8px; font-size: 16px; }
.archive-description p:last-child { margin: 0; }

.story-row {
	display: grid; grid-template-columns: 260px 1fr; gap: 22px;
	padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--c-rule);
}
.story-row.no-thumb { grid-template-columns: 1fr; }
.story-row .story-thumb { margin: 0; }
.story-row .story-title { font-size: 1.45rem; }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--f-sans); font-size: 14px; margin-top: 12px; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 38px; height: 38px; padding: 0 10px;
	border: 1px solid var(--c-rule); color: var(--c-ink); font-weight: 600;
}
.page-numbers.current, .page-numbers:hover { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }

/* ==========================================================================
   10. Single article
   ========================================================================== */
.article-header { max-width: 820px; margin: 0 auto 24px; text-align: center; }
.article-title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; letter-spacing: -.015em; line-height: 1.12; }
.article-standfirst { font-size: 1.25rem; color: var(--c-muted); font-style: italic; margin-bottom: 16px; }
.article-header .story-meta { justify-content: center; border-top: 1px solid var(--c-rule); border-bottom: 1px solid var(--c-rule); padding: 10px 0; }

.article-figure { margin: 0 0 32px; }
.article-figure img { width: 100%; }
.article-figure figcaption, .wp-caption-text, .wp-element-caption {
	font-family: var(--f-sans); font-size: 13px; color: var(--c-muted); padding-top: 8px; border-bottom: 1px solid var(--c-rule); padding-bottom: 8px;
}

.article-layout { display: grid; grid-template-columns: 56px minmax(0, 1fr) 300px; gap: 32px; }

.share-rail { position: sticky; top: 80px; align-self: start; display: flex; flex-direction: column; gap: 8px; }
.share-rail a, .share-rail button {
	display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%;
	border: 1px solid var(--c-rule); background: #fff; color: var(--c-ink); padding: 0;
}
.share-rail a:hover, .share-rail button:hover { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.share-rail svg { width: 16px; height: 16px; fill: currentColor; }

.entry-content { font-size: 19px; line-height: 1.75; max-width: 700px; }
.entry-content > p:first-of-type::first-letter {
	float: left;
	font-family: var(--f-display);
	font-size: 4.2em;
	line-height: .85;
	font-weight: 900;
	padding: 6px 10px 0 0;
	color: var(--c-ink);
}
.entry-content a { color: var(--c-link-hover); text-decoration: underline; text-underline-offset: 3px; }
.entry-content h2 { font-size: 1.6rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin-bottom: 1.2em; }
.entry-content li { margin-bottom: .4em; }
.entry-content img { margin: 1em 0; }
.entry-content .alignleft { float: left; margin: .4em 1.5em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .4em 0 1em 1.5em; max-width: 50%; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content .alignwide { margin-left: -60px; margin-right: -60px; max-width: none; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; font-family: var(--f-sans); font-size: 13px; }
.entry-tags a { padding: 5px 12px; border: 1px solid var(--c-rule); }
.entry-tags a:hover { border-color: var(--c-ink); background: var(--c-ink); color: #fff; }

.author-box {
	display: grid; grid-template-columns: 80px 1fr; gap: 18px;
	padding: 22px 0; border-top: 3px solid var(--c-rule-strong); border-bottom: 1px solid var(--c-rule);
	margin: 32px 0;
}
.author-box img { border-radius: 50%; }
.author-box h4 { font-size: 1.15rem; margin-bottom: 4px; }
.author-box p { font-size: 15.5px; color: var(--c-muted); margin: 0; }

.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.post-navigation a { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; color: var(--c-ink); }
.post-navigation .nav-next { text-align: right; }
.post-navigation .meta-nav { display: block; font-family: var(--f-sans); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 4px; }

.related { margin-top: 48px; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.related-grid .story-title { font-size: 1.05rem; }

.reading-progress {
	position: fixed; top: 0; left: 0; height: 3px; width: 0;
	background: var(--c-accent); z-index: 100; transition: width .1s linear;
}
.admin-bar .reading-progress { top: 32px; }

/* ==========================================================================
   11. Sidebar & widgets
   ========================================================================== */
.sidebar .widget { margin-bottom: 36px; }
.widget-title {
	font-family: var(--f-sans);
	font-size: 14px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
	border-top: 3px solid var(--c-rule-strong); padding-top: 10px; margin-bottom: 16px;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--c-rule); font-size: 15.5px; }
.widget li:last-child { border-bottom: 0; }

.most-read { counter-reset: mr; }
.most-read li { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 12px 0; counter-increment: mr; }
.most-read li::before {
	content: counter(mr);
	font-family: var(--f-display); font-size: 2rem; font-weight: 900; line-height: 1;
	color: var(--c-rule);
}
.most-read a { font-family: var(--f-display); font-weight: 700; font-size: 1rem; line-height: 1.3; color: var(--c-ink); }

.newsletter-box { background: var(--c-ink); color: #eee; padding: 24px; }
.newsletter-box h3 { color: #fff; font-size: 1.35rem; }
.newsletter-box p { font-size: 15px; color: #c8c8c8; }
.newsletter-box .button { background: var(--c-accent); width: 100%; text-align: center; }
.newsletter-box .button:hover { background: #fff; color: var(--c-ink); }

/* ==========================================================================
   12. Comments
   ========================================================================== */
.comments-area { margin-top: 40px; font-family: var(--f-sans); font-size: 15px; }
.comments-title { font-size: 1.3rem; }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .children { list-style: none; padding-left: 32px; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--c-rule); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 12px; color: var(--c-muted); margin: 4px 0 10px; }
.reply a { font-size: 12.5px; font-weight: 700; color: var(--c-accent); }
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }

/* ==========================================================================
   13. Footer
   ========================================================================== */
.site-footer { background: var(--c-ink); color: #bdbdbd; font-family: var(--f-sans); font-size: 14px; margin-top: 40px; }
.site-footer a { color: #e6e6e6; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand { padding: 40px 0 28px; border-bottom: 1px solid #333; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand .site-title { color: #fff; font-size: 2.2rem; }
.footer-widgets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 32px 0; }
.site-footer .widget-title { color: #fff; border-top-color: var(--c-accent); font-size: 12.5px; }
.site-footer .widget li { border-bottom-color: #2c2c2c; font-size: 14px; }
.footer-bottom { border-top: 1px solid #333; padding: 18px 0; font-size: 12.5px; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }

.back-to-top {
	position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; padding: 0;
	border-radius: 50%; background: var(--c-accent); color: #fff;
	opacity: 0; visibility: hidden; transition: all .2s; z-index: 90;
	display: flex; align-items: center; justify-content: center;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top svg { width: 18px; height: 18px; }

/* ==========================================================================
   14. Pages, 404, misc
   ========================================================================== */
.page-content-wrap { max-width: 800px; margin: 0 auto; }
.page-content-wrap .entry-content > p:first-of-type::first-letter { all: unset; }
.error-404 { text-align: center; padding: 60px 0; max-width: 640px; margin: 0 auto; }
.error-404 .big { font-family: var(--f-display); font-size: 8rem; font-weight: 900; line-height: 1; color: var(--c-accent); }
.no-results { padding: 24px 0; }
.sticky .kicker::after { content: " \2022 Featured"; color: var(--c-muted); }
.bypostauthor > .comment-body .comment-author::after { content: "Author"; font-size: 10px; background: var(--c-accent); color: #fff; padding: 2px 6px; border-radius: 2px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-caption { font-size: 13px; }
.alignnone { margin: 1em 0; }

/* ==========================================================================
   15. Advertisements
   ========================================================================== */
.ad-slot {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0 auto 32px;
	text-align: center;
	clear: both;
}
.ad-slot .ad-unit { max-width: 100%; overflow: hidden; }
.ad-slot .ad-unit + .ad-unit { margin-top: 12px; }
.ad-slot img { margin: 0 auto; }
.ad-label {
	display: block;
	font-family: var(--f-sans);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #9a9a9a;
	margin-bottom: 6px;
}

.ad-slot--leaderboard { padding: 18px 0 0; margin-bottom: 4px; }
.ad-slot--billboard { padding: 22px 0; border-top: 1px solid var(--c-rule); border-bottom: 1px solid var(--c-rule); margin-bottom: 40px; }
.ad-slot--inline { float: none; margin: 1.6em auto; padding: 14px 0; border-top: 1px solid var(--c-rule); border-bottom: 1px solid var(--c-rule); }
.entry-content .ad-slot--inline .ad-label { font-size: 10px; }
.sidebar .ad-slot { margin-bottom: 36px; }
.ad-slot--sticky { position: sticky; top: 72px; }
.admin-bar .ad-slot--sticky { top: 104px; }
.story-row + .ad-slot { padding-bottom: 24px; border-bottom: 1px solid var(--c-rule); margin-bottom: 24px; }

/* Placeholder (admins only, when the slot has no widget) */
.ad-placeholder {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	width: 100%;
	background: repeating-linear-gradient(45deg, #f7f6f2, #f7f6f2 10px, #efede7 10px, #efede7 20px);
	border: 2px dashed #c9c5bb;
	color: #7a766d;
	font-family: var(--f-sans);
	font-size: 13px;
	padding: 12px;
}
.ad-placeholder:hover { color: var(--c-ink); border-color: var(--c-ink); }
.ad-placeholder strong { color: var(--c-ink); font-size: 14px; }
.ad-placeholder em { font-size: 11px; font-style: normal; opacity: .8; }
.ad-slot--header .ad-placeholder, .ad-slot--footer .ad-placeholder,
.ad-slot--home-infeed .ad-placeholder, .ad-slot--article-top .ad-placeholder,
.ad-slot--article-bottom .ad-placeholder, .ad-slot--archive-infeed .ad-placeholder { max-width: 728px; min-height: 90px; }
.ad-slot--home-top .ad-placeholder { max-width: 970px; min-height: 250px; }
.ad-slot--sidebar .ad-placeholder, .ad-slot--article-inline .ad-placeholder { max-width: 300px; min-height: 250px; }
.ad-slot--sidebar-sticky .ad-placeholder { max-width: 300px; min-height: 600px; }

/* Mobile sticky bottom ad */
.ad-anchor { display: none; }
@media (max-width: 768px) {
	.ad-anchor {
		display: flex; justify-content: center; align-items: center;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
		min-height: 58px; padding: 4px 0;
		background: #fff; border-top: 1px solid var(--c-rule);
		box-shadow: 0 -4px 14px rgba(0,0,0,.08);
	}
	.ad-anchor.is-closed { display: none; }
	.ad-anchor-close {
		position: absolute; top: -24px; right: 8px;
		width: 24px; height: 24px; padding: 0; line-height: 1;
		border-radius: 4px 4px 0 0; background: #fff; color: var(--c-ink);
		border: 1px solid var(--c-rule); border-bottom: 0; font-size: 18px;
	}
	body.has-ad-anchor { padding-bottom: 66px; }
	body.has-ad-anchor .back-to-top { bottom: 80px; }
}

/* ==========================================================================
   16. Asian Pulse – brand details & news details page
   ========================================================================== */
.site-branding .custom-logo-link img { height: 84px; max-height: none; width: auto; max-width: min(420px, 100%); object-fit: contain; }
.entry-content .ad-slot a { color: inherit; text-decoration: none; }
.footer-logo img { max-height: 54px; width: auto; }
.footer-logo--chip { display: inline-block; background: #fff; padding: 8px 14px; border-radius: 4px; }

.topbar { border-bottom: 2px solid var(--c-accent); }
.ticker-label { background: var(--c-accent); }
.section-head { border-top-color: var(--c-ink); position: relative; }
.section-head::before {
	content: ""; position: absolute; top: -3px; left: 0;
	width: 64px; height: 3px; background: var(--c-accent);
}
.widget-title { position: relative; }
.widget-title::before { content: ""; position: absolute; top: -3px; left: 0; width: 48px; height: 3px; background: var(--c-accent); }
.site-footer .widget-title::before { display: none; }

.breadcrumbs {
	display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
	font-family: var(--f-sans); font-size: 12.5px; color: var(--c-muted);
	margin-bottom: 14px;
}
.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs a:hover { color: var(--c-accent); }

.article-byline {
	display: flex; align-items: center; justify-content: center; gap: 12px;
	border-top: 1px solid var(--c-rule); border-bottom: 1px solid var(--c-rule);
	padding: 12px 0; text-align: left;
	font-family: var(--f-sans); font-size: 13px; color: var(--c-muted);
}
.article-byline img { border-radius: 50%; }
.byline-name { display: block; color: var(--c-ink); font-weight: 600; font-size: 14px; }
.byline-name a { color: var(--c-accent); }
.byline-dates .sep::before { content: "\00B7"; margin: 0 6px; }

.entry-tags { align-items: center; }
.entry-tags-label { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 11.5px; margin-right: 4px; }
.entry-tags a { border-radius: 999px; background: var(--c-paper-alt); border-color: transparent; }
.entry-tags a:hover { background: var(--c-accent); border-color: var(--c-accent); }

.share-bar {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	padding: 14px 0; border-top: 1px solid var(--c-rule); border-bottom: 1px solid var(--c-rule);
	font-family: var(--f-sans); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.share-inline { display: flex; gap: 8px; }
.share-inline a, .share-inline button {
	display: flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%; padding: 0;
	background: var(--c-ink); color: #fff; border: 0;
}
.share-inline a:hover, .share-inline button:hover { background: var(--c-accent); color: #fff; }
.share-inline svg { width: 16px; height: 16px; fill: currentColor; }
.share-rail a:hover, .share-rail button:hover { background: var(--c-accent); border-color: var(--c-accent); }

.author-box { border-top-color: var(--c-accent); }
.author-box .kicker { margin-bottom: 2px; }

.article .ad-slot--inline { max-width: 100%; }
.article-main > .ad-slot:first-child { margin-bottom: 24px; }

@media (max-width: 680px) {
	.site-branding .custom-logo-link img { height: 56px; }
	.article-byline { justify-content: flex-start; }
	.breadcrumbs { justify-content: flex-start; }
	.article-header { text-align: left; }
}

/* ==========================================================================
   17. Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.article-layout { grid-template-columns: 48px minmax(0, 1fr); }
	.article-layout .sidebar { grid-column: 1 / -1; }
	.cat-row, .related-grid { grid-template-columns: repeat(2, 1fr); }
	.entry-content .alignwide { margin-left: 0; margin-right: 0; }
}

@media (max-width: 960px) {
	.front-top { grid-template-columns: 1fr 1fr; }
	.front-top .lead-story { grid-column: 1 / -1; order: -1; padding: 0 0 24px; border-left: 0; border-bottom: 1px solid var(--c-rule); margin-bottom: 24px; }
	.front-top > .front-secondary { padding-left: 0; border-left: 0; }
	.front-body, .content-area { grid-template-columns: 1fr; }
	.footer-widgets { grid-template-columns: repeat(2, 1fr); }
	.opinion-grid { grid-template-columns: 1fr; }
	.ad-slot--sticky { position: static; }
	.ad-slot--sidebar-sticky .ad-placeholder { min-height: 250px; }
	.ad-slot--home-top .ad-placeholder { min-height: 120px; }

	.menu-toggle { display: inline-flex; }
	.primary-menu-wrap { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--c-rule); box-shadow: 0 10px 20px rgba(0,0,0,.08); max-height: 75vh; overflow-y: auto; }
	.primary-menu-wrap.is-open { display: block; }
	.primary-menu { flex-direction: column; }
	.primary-menu a { padding: 12px var(--gutter); border-bottom: 1px solid #f0f0f0; }
	.primary-menu > li > a:hover { box-shadow: none; }
	.primary-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 16px; }
}

@media (max-width: 782px) {
	.admin-bar .site-nav.is-stuck, .admin-bar .reading-progress { top: 46px; }
}

@media (max-width: 680px) {
	:root { --gutter: 16px; }
	body { font-size: 17px; }
	.topbar-menu { display: none; }
	.masthead-inner { grid-template-columns: 1fr; text-align: center; }
	.masthead-meta, .masthead-right { display: none; }
	.front-top { grid-template-columns: 1fr; }
	.front-top > * { padding: 0 !important; border-left: 0 !important; }
	.front-top .latest { border-top: 3px solid var(--c-rule-strong); padding-top: 14px !important; margin-top: 24px; }
	.cat-block-grid, .cat-row, .related-grid, .footer-widgets, .post-navigation .nav-links { grid-template-columns: 1fr; }
	.story-row { grid-template-columns: 1fr; }
	.article-layout { grid-template-columns: 1fr; }
	.share-rail { position: static; flex-direction: row; order: 2; }
	.entry-content { font-size: 18px; }
	.entry-content .alignleft, .entry-content .alignright { float: none; margin: 1em 0; max-width: 100%; }
	.post-navigation .nav-next { text-align: left; }
}

@media print {
	.topbar, .site-nav, .ticker, .share-rail, .sidebar, .site-footer, .comments-area, .related, .back-to-top, .reading-progress { display: none !important; }
	.article-layout { display: block; }
}
