/* ==========================================================================
   Daily News Pinch — front-end
   Colours come from News Pinch → Settings → Design (--dnp-primary / --dnp-accent).
   ========================================================================== */
:root {
	--dnp-primary: #16213E;
	--dnp-accent: #F4B400;
	--dnp-live: #E5383B;
	--dnp-wa: #25D366;
	--dnp-text: #1A2030;
	--dnp-muted: #667085;
	--dnp-line: #E6E8EF;
	--dnp-surface: #FFFFFF;
	--dnp-soft: #FFF6D9;
	--dnp-soft: color-mix(in srgb, var(--dnp-accent) 16%, #fff);
	--dnp-radius: 16px;
	--dnp-font: "Mukta", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
}

[class^="dnp-"], [class*=" dnp-"] { box-sizing: border-box; }
.dnp-ticker, .dnp-top, .dnp-section, .dnp-dsections, .dnp-districts, .dnp-follow, .dnp-meta-box, .dnp-sec-title, .dnp-list { font-family: var(--dnp-font); }

/* ---------- Section heading ---------- */
.dnp-sec-title {
	display: flex; align-items: center; gap: 10px;
	font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); font-weight: 800; line-height: 1.2;
	color: var(--dnp-primary); margin: 0 0 16px;
}
.dnp-sec-title::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--dnp-accent); flex: none; }

/* ---------- Chips & meta ---------- */
.dnp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 4px; }
.dnp-chip {
	display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
	background: var(--dnp-soft); color: var(--dnp-primary);
	font-size: .78rem; font-weight: 700; line-height: 1.5;
}
.dnp-chip-live { background: var(--dnp-live); color: #fff; }
.dnp-meta time { font-size: .8rem; color: var(--dnp-muted); }

/* ---------- Placeholder tile (story without photo) ---------- */
.dnp-ph {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	min-height: 64px; padding: 8px; text-align: center;
	background: linear-gradient(135deg, var(--dnp-primary), color-mix(in srgb, var(--dnp-primary) 55%, var(--dnp-accent)));
	color: #fff; font-weight: 800; font-size: 1rem;
}

/* ---------- Breaking ticker ---------- */
.dnp-ticker {
	display: flex; align-items: stretch; overflow: hidden; margin-bottom: 24px;
	background: var(--dnp-primary); color: #fff; border-radius: 12px; font-size: 1rem;
}
.dnp-ticker-label {
	display: flex; align-items: center; gap: 8px; padding: 10px 16px; flex: none;
	background: var(--dnp-accent); color: var(--dnp-primary); font-weight: 800; white-space: nowrap;
}
.dnp-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dnp-live); box-shadow: 0 0 0 0 rgba(229,56,59,.6); animation: dnp-pulse 1.6s infinite; }
@keyframes dnp-pulse { 70% { box-shadow: 0 0 0 9px rgba(229,56,59,0); } 100% { box-shadow: 0 0 0 0 rgba(229,56,59,0); } }
.dnp-ticker-viewport { overflow: hidden; flex: 1; display: flex; align-items: center; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.dnp-ticker-track { display: inline-flex; gap: 18px; white-space: nowrap; padding-left: 18px; animation: dnp-scroll var(--dnp-speed, 45s) linear infinite; }
.dnp-ticker-dup { display: inline-flex; gap: 18px; }
.dnp-ticker:hover .dnp-ticker-track, .dnp-ticker:focus-within .dnp-ticker-track { animation-play-state: paused; }
.dnp-ticker .dnp-ticker-track a { color: #fff; text-decoration: none; font-weight: 500; }
.dnp-ticker .dnp-ticker-track a:hover, .dnp-ticker .dnp-ticker-track a:focus-visible { color: var(--dnp-accent); }
.dnp-sep { color: var(--dnp-accent); }
@keyframes dnp-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Top stories ---------- */
.dnp-top, .dnp-section { margin-bottom: 36px; }
.dnp-top-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; }
.dnp-lead { position: relative; border-radius: var(--dnp-radius); overflow: hidden; background: var(--dnp-primary); min-height: 400px; isolation: isolate; }
.dnp-lead-media, .dnp-lead-media img, .dnp-lead-media .dnp-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.dnp-lead-media img { transition: transform .5s ease; }
.dnp-lead:hover .dnp-lead-media img { transform: scale(1.03); }
.dnp-lead-body {
	position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 400px;
	padding: 28px; color: #fff;
	background: linear-gradient(180deg, color-mix(in srgb, var(--dnp-primary) 10%, transparent) 0%, color-mix(in srgb, var(--dnp-primary) 55%, transparent) 40%, color-mix(in srgb, var(--dnp-primary) 96%, transparent) 85%);
	text-shadow: 0 1px 12px rgba(0,0,0,.25);
}
.dnp-lead-body .dnp-chip:not(.dnp-chip-live) { background: var(--dnp-accent); color: var(--dnp-primary); }
.dnp-lead-body time { color: rgba(255,255,255,.8); }
.dnp-lead h3 { font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.1rem); font-weight: 800; line-height: 1.2; margin: 6px 0 8px; }
.dnp-lead .dnp-lead-body h3 a { color: #fff; text-decoration: none; }
.dnp-lead h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.dnp-lead p { margin: 0; color: rgba(255,255,255,.88); font-size: 1rem; line-height: 1.5; max-width: 60ch; }
.dnp-top-rest .dnp-list { margin-top: -10px; }

/* ---------- Story list ---------- */
.dnp-list { list-style: none; margin: 0; padding: 0; }
.dnp-item { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--dnp-line); margin: 0; }
.dnp-item:last-child { border-bottom: 0; }
.dnp-list-plain .dnp-item { grid-template-columns: minmax(0, 1fr); }
.dnp-thumb { display: block; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: var(--dnp-line); }
.dnp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.dnp-item:hover .dnp-thumb img { transform: scale(1.05); }
.dnp-thumb .dnp-ph { font-size: .85rem; }
.dnp-title {
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
	font-weight: 700; font-size: 1.02rem; line-height: 1.35; color: var(--dnp-text); text-decoration: none;
}
.dnp-title:hover, .dnp-title:focus-visible { color: var(--dnp-primary); text-decoration: underline; text-decoration-color: var(--dnp-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.dnp-more {
	display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 7px 16px; border-radius: 999px;
	border: 1.5px solid var(--dnp-primary); color: var(--dnp-primary); font-weight: 700; font-size: .9rem; text-decoration: none;
}
.dnp-more:hover, .dnp-more:focus-visible { background: var(--dnp-primary); color: #fff; }
.dnp-empty { color: var(--dnp-muted); font-style: italic; }

/* ---------- District buttons ---------- */
.dnp-districts { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-bottom: 36px; }
.dnp-districts a {
	display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px;
	background: var(--dnp-surface); border: 1px solid var(--dnp-line); border-radius: 12px;
	color: var(--dnp-text); font-weight: 700; text-decoration: none; transition: background .2s, color .2s, border-color .2s;
}
.dnp-districts small { min-width: 26px; padding: 0 7px; border-radius: 999px; background: var(--dnp-soft); color: var(--dnp-primary); font-size: .75rem; font-weight: 800; text-align: center; line-height: 1.7; }
.dnp-districts a:hover, .dnp-districts a:focus-visible { background: var(--dnp-primary); border-color: var(--dnp-primary); color: #fff; }
.dnp-districts a:hover small, .dnp-districts a:focus-visible small { background: var(--dnp-accent); }

/* ---------- District sections ---------- */
.dnp-dsections { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 36px; }
.dnp-dsection { background: var(--dnp-surface); border: 1px solid var(--dnp-line); border-radius: var(--dnp-radius); padding: 18px 18px 14px; }
.dnp-dsection-title { display: flex; justify-content: space-between; align-items: center; margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; }
.dnp-dsection-title a { color: var(--dnp-primary); text-decoration: none; }
.dnp-dsection-title span { font-size: .75rem; font-weight: 800; color: var(--dnp-primary); background: var(--dnp-soft); padding: 1px 9px; border-radius: 999px; }
.dnp-dsection .dnp-item { grid-template-columns: 84px minmax(0, 1fr); padding: 10px 0; }
.dnp-dsection .dnp-list-plain .dnp-item { grid-template-columns: minmax(0, 1fr); }
.dnp-dsection .dnp-title { font-size: .95rem; -webkit-line-clamp: 2; }
.dnp-dsection .dnp-more { border: 0; padding: 4px 0; margin-top: 6px; }
.dnp-dsection .dnp-more:hover { background: none; color: var(--dnp-primary); text-decoration: underline; }

/* ---------- WhatsApp ---------- */
.dnp-follow {
	display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px;
	background: var(--dnp-wa); color: #05301A; font-weight: 800; line-height: 1.3; text-decoration: none;
	box-shadow: 0 6px 18px -8px rgba(37,211,102,.8); transition: transform .15s;
}
.dnp-follow:hover { transform: translateY(-1px); color: #05301A; }
.dnp-follow svg { flex: none; }
.dnp-follow-banner { display: flex; justify-content: center; width: 100%; padding: 16px; margin-bottom: 28px; }
.dnp-wa-float {
	position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 999;
	display: flex; align-items: center; gap: 6px; padding: 11px 16px; border-radius: 999px;
	background: var(--dnp-wa); color: #05301A; font: 800 15px/1 var(--dnp-font); text-decoration: none;
	box-shadow: 0 10px 24px -8px rgba(0,0,0,.35);
}
.dnp-follow:focus-visible, .dnp-wa-float:focus-visible, .dnp-more:focus-visible, .dnp-districts a:focus-visible { outline: 3px solid var(--dnp-accent); outline-offset: 2px; }

/* ---------- Under each story ---------- */
.dnp-meta-box { margin-top: 32px; padding: 20px 22px; border-radius: var(--dnp-radius); background: var(--dnp-soft); }
.dnp-meta-box p { margin: 0 0 10px; }
.dnp-meta-box a { color: var(--dnp-primary); font-weight: 700; }
.dnp-meta-box .dnp-follow { color: #05301A; margin-top: 4px; }
.dnp-source { color: var(--dnp-muted); font-size: .92rem; }
.dnp-sample-note { padding: 10px 14px; border: 1.5px dashed var(--dnp-accent); border-radius: 10px; background: var(--dnp-soft); font-size: .92rem; color: var(--dnp-primary); }

/* ---------- Whole-site style (Settings → Design) ---------- */
body.dnp-sitewide { font-family: var(--dnp-font); color: var(--dnp-text); }
body.dnp-sitewide :is(h1, h2, h3, h4, h5, h6) { font-family: var(--dnp-font); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
body.dnp-sitewide :is(h1, h2, h3, h4, h5, h6) a:not([class*="dnp-"]):not(:is(.dnp-ticker, .dnp-top, .dnp-section, .dnp-dsections, .dnp-districts, .dnp-meta-box, .dnp-list) a) { color: var(--dnp-primary); }
body.dnp-sitewide .wp-block-site-title a, body.dnp-sitewide .site-title a { color: var(--dnp-primary); font-weight: 800; text-decoration: none; }
body.dnp-sitewide :is(.wp-block-post-content, .entry-content) a:not([class*="dnp-"]):not(:is(.dnp-ticker, .dnp-top, .dnp-section, .dnp-dsections, .dnp-districts, .dnp-meta-box, .dnp-list) a) { color: var(--dnp-primary); text-decoration-color: var(--dnp-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
body.dnp-sitewide .wp-block-post-content, body.dnp-sitewide .entry-content { font-size: 1.12rem; line-height: 1.75; }
body.dnp-sitewide :is(.wp-element-button, .wp-block-button__link, .wp-block-search__button) { background: var(--dnp-primary); color: #fff; border-radius: 10px; }
body.dnp-sitewide.home.page :is(.wp-block-post-title, .entry-title, .page-title) { display: none; }

/* ---------- Responsive & motion ---------- */
@media (max-width: 782px) {
	.dnp-top-grid { grid-template-columns: 1fr; }
	.dnp-lead, .dnp-lead-body { min-height: 280px; }
	.dnp-lead-body { padding: 20px; }
	.dnp-item { grid-template-columns: 96px minmax(0, 1fr); }
	.dnp-ticker-label { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.dnp-ticker-track, .dnp-live-dot { animation: none; }
	.dnp-ticker-dup { display: none; }
	.dnp-ticker-viewport { overflow-x: auto; }
	.dnp-lead-media img, .dnp-thumb img, .dnp-follow { transition: none; }
}
