/*
Theme Name: UP Khabar Express
Theme URI: https://upkhabarexpress.in
Author: LiveSK Web Studio
Author URI: https://upkhabarexpress.in
Description: यूपी खबर एक्सप्रेस — Hyper-local news platform for Uttar Pradesh. Custom native WordPress theme with Frontend Editorial Portal (/portal), 3-tier RBAC workflow (State Desk / Zila Desk / Ground Desk), public reporter applications (आवेदन → जिला ब्यूरो → हेड ब्यूरो), local ad engine with 60/20/20 commission split, unique reporter follow system, all-in share buttons, anti-fraud 24-hour unique views, wallet rewards, multi-photo + 50MB video uploads, PWA support and the Dainik Bhaskar news design system. No page builders, no plugin dependencies. Launch districts: वाराणसी, गाजीपुर, गोरखपुर, देवरिया, मऊ, बलिया, लखनऊ.
Version: 1.2.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: up-khabar-express
Tags: news, magazine, newsroom, pwa, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   1. DESIGN TOKENS & RESET
   ========================================================================== */
:root {
  --up-red: #D32F2F;
  --up-red-dark: #A02020;
  --up-red-soft: #FDECEC;
  --up-dark: #111827;
  --up-dark-2: #1F2937;
  --up-slate: #F8FAFC;
  --up-line: #E5E7EB;
  --up-yellow: #FACC15;
  --up-green: #15803D;
  --up-green-soft: #DCFCE7;
  --up-blue: #1D4ED8;
  --up-blue-soft: #DBEAFE;
  --up-text: #111827;
  --up-muted: #6B7280;
  --up-white: #FFFFFF;
  --up-radius: 10px;
  --up-radius-sm: 6px;
  --up-shadow: 0 1px 3px rgba(17, 24, 39, .08), 0 4px 14px rgba(17, 24, 39, .06);
  --up-shadow-lg: 0 8px 30px rgba(17, 24, 39, .14);
  --up-font: 'Noto Sans Devanagari', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--up-font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--up-text);
  background: var(--up-slate);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--up-red); }

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  font-weight: 800;
  line-height: 1.3;
  color: var(--up-dark);
}

ul, ol { margin: 0 0 1em; padding-inline-start: 1.4em; }

button, input, select, textarea { font-family: inherit; font-size: inherit; }

:focus-visible { outline: 2px solid var(--up-red); outline-offset: 2px; }

::selection { background: var(--up-red); color: #fff; }

.up-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   2. HEADER — UTILITY BAR / MASTHEAD / TICKER / DISTRICT PILLS / NAV
   ========================================================================== */
.up-topbar {
  background: var(--up-dark);
  color: #D1D5DB;
  font-size: 13px;
  font-weight: 600;
}

.up-topbar .up-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}

.up-topbar a { color: #FACC15; white-space: nowrap; }
.up-topbar a:hover { color: #fff; }

.up-edition { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Masthead */
.up-masthead { background: var(--up-white); border-bottom: 3px solid var(--up-red); }

.up-masthead .up-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.up-brand { display: flex; flex-direction: column; line-height: 1.15; }

.up-brand-logo {
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--up-red);
}

.up-brand-logo .up-brand-dark { color: var(--up-dark); }

.up-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  width: fit-content;
  background: var(--up-yellow);
  color: var(--up-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 12px;
  border-radius: 999px;
}

.up-header-actions { display: flex; align-items: center; gap: 10px; }

.up-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 20px;
  border: 0;
  border-radius: var(--up-radius-sm);
  background: var(--up-red);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease;
}

.up-btn:hover { background: var(--up-red-dark); color: #fff; }
.up-btn:active { transform: scale(.98); }

.up-btn--ghost {
  background: transparent;
  color: var(--up-dark);
  border: 2px solid var(--up-line);
}
.up-btn--ghost:hover { border-color: var(--up-red); color: var(--up-red); background: transparent; }

.up-btn--dark { background: var(--up-dark); }
.up-btn--dark:hover { background: #000; }

.up-btn--yellow { background: var(--up-yellow); color: var(--up-dark); }
.up-btn--yellow:hover { background: #EAB308; color: var(--up-dark); }

.up-btn--ok { background: var(--up-green); }
.up-btn--ok:hover { background: #166534; }

.up-search-form { display: none; align-items: center; gap: 6px; }
.up-search-form input {
  height: 44px;
  border: 2px solid var(--up-line);
  border-radius: var(--up-radius-sm);
  padding: 0 12px;
  min-width: 180px;
  background: var(--up-slate);
}
.up-search-form input:focus { border-color: var(--up-red); outline: none; }
.up-search-open .up-search-form { display: flex; }

/* Breaking ticker */
.up-ticker {
  background: var(--up-dark);
  color: #fff;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.up-ticker-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--up-red);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  padding: 8px 14px;
  white-space: nowrap;
  z-index: 2;
}

.up-ticker-dot {
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: upPulse 1.2s ease infinite;
}

@keyframes upPulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.up-ticker-viewport { overflow: hidden; flex: 1 1 auto; display: flex; align-items: center; }

.up-ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: upMarquee 45s linear infinite;
  will-change: transform;
}

.up-ticker:hover .up-ticker-track { animation-play-state: paused; }

.up-ticker-track a {
  color: #F3F4F6;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 26px;
  position: relative;
}

.up-ticker-track a::after {
  content: "•";
  position: absolute;
  right: -3px;
  color: var(--up-red);
}

.up-ticker-track a:hover { color: var(--up-yellow); }

@keyframes upMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* District pills */
.up-pills {
  background: var(--up-white);
  border-bottom: 1px solid var(--up-line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.up-pills-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 9px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.up-pills-track::-webkit-scrollbar { display: none; }

.up-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 16px;
  border-radius: 999px;
  background: var(--up-slate);
  border: 1.5px solid var(--up-line);
  font-weight: 700;
  font-size: 14px;
  color: var(--up-dark);
  white-space: nowrap;
  transition: all .15s ease;
}

.up-pill:hover { border-color: var(--up-red); color: var(--up-red); }

.up-pill.is-active {
  background: var(--up-red);
  border-color: var(--up-red);
  color: #fff;
}

/* Primary nav */
.up-nav { background: var(--up-white); border-bottom: 1px solid var(--up-line); }

.up-nav .up-container { display: flex; align-items: center; justify-content: space-between; }

.up-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }

.up-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 14px;
  font-weight: 700;
  font-size: 15px;
  color: var(--up-dark-2);
  border-bottom: 3px solid transparent;
}

.up-menu a:hover, .up-menu .current-menu-item > a, .up-menu .current_page_item > a {
  color: var(--up-red);
  border-bottom-color: var(--up-red);
}

.up-nav-toggle {
  display: none;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: var(--up-dark);
}

/* ==========================================================================
   3. FRONT PAGE FEED
   ========================================================================== */
.up-main {
  padding: 20px 0 40px;
  min-height: 50vh;
}

.up-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.up-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.up-section-head h2 {
  margin: 0;
  font-size: 22px;
  position: relative;
  padding-left: 12px;
}

.up-section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 5px;
  border-radius: 4px;
  background: var(--up-red);
}

.up-section-link { margin-left: auto; font-weight: 700; font-size: 14px; color: var(--up-red); }

/* Hero */
.up-hero {
  position: relative;
  display: block;
  border-radius: var(--up-radius);
  overflow: hidden;
  background: var(--up-dark);
  box-shadow: var(--up-shadow-lg);
  margin-bottom: 24px;
}

.up-hero-media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1F2937, #111827); }
.up-hero-media img { width: 100%; height: 100%; object-fit: cover; }

.up-hero-body { padding: 18px; }

.up-hero h3 {
  color: #fff;
  font-size: clamp(20px, 3.4vw, 30px);
  font-weight: 900;
  margin: 10px 0 8px;
}

.up-hero:hover h3 { color: var(--up-yellow); }

.up-hero-meta { color: #9CA3AF; font-size: 13.5px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 10px 16px; }

/* Badges */
.up-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.6;
  white-space: nowrap;
}

.up-badge--fire { background: var(--up-yellow); color: var(--up-dark); }
.up-badge--red { background: var(--up-red); color: #fff; }
.up-badge--live { background: var(--up-green-soft); color: var(--up-green); }
.up-badge--dark { background: rgba(0,0,0,.72); color: #fff; backdrop-filter: blur(4px); }
.up-badge--view { background: var(--up-blue-soft); color: var(--up-blue); }

.up-hero-flag { position: absolute; top: 14px; left: 14px; z-index: 2; }

/* Story grid */
.up-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.up-card {
  background: var(--up-white);
  border: 1px solid var(--up-line);
  border-radius: var(--up-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.up-card:hover { box-shadow: var(--up-shadow-lg); transform: translateY(-2px); border-color: #FCA5A5; }

.up-card-media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #E5E7EB, #F8FAFC); }
.up-card-media img { width: 100%; height: 100%; object-fit: cover; }

.up-card-placeholder {
        width: 100%;
        height: 100%;
        min-height: 140px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--up-red), #7F1D1D);
        color: #fff;
        font-weight: 900;
        font-size: 18px;
        letter-spacing: 1px;
}

.up-card-media .up-video-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, .25);
}

.up-video-mark span {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  background: var(--up-red);
  color: #fff;
  border-radius: 50%;
  font-size: 20px;
  padding-left: 4px;
  box-shadow: 0 0 0 6px rgba(211, 47, 47, .3);
}

.up-card-media .up-badge { position: absolute; top: 10px; left: 10px; }

.up-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }

.up-card-body h3 { font-size: 17px; font-weight: 800; margin: 0 0 6px; }

.up-card-body h3 a { display: block; }

.up-card-excerpt {
  color: var(--up-muted);
  font-size: 14px;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.up-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--up-line);
}

.up-card-foot-meta { font-size: 12.5px; color: var(--up-muted); font-weight: 600; display: flex; gap: 12px; flex-wrap: wrap; }

.up-share-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #DCFCE7;
  color: #15803D;
  font-weight: 800;
  font-size: 13px;
}

.up-share-wa:hover { background: #15803D; color: #fff; }

/* Video bulletin section */
.up-video-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.up-video-card {
  position: relative;
  border-radius: var(--up-radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
  max-height: 520px;
}

.up-video-card .up-embed { position: absolute; inset: 0; }
.up-video-card iframe { width: 100%; height: 100%; border: 0; }

.up-video-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 34px 12px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  z-index: 3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.up-unmute {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 4;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  transition: background .15s ease;
}

.up-unmute:hover { background: rgba(255,255,255,.4); }

/* Sidebar */
.up-sidebar { display: flex; flex-direction: column; gap: 24px; }

.up-widget {
  background: var(--up-white);
  border: 1px solid var(--up-line);
  border-radius: var(--up-radius);
  padding: 16px;
}

.up-widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--up-yellow);
}

.up-widget-title::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--up-red);
}

.up-trend-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--up-line);
}

.up-trend-item:last-child { border-bottom: 0; }

.up-trend-rank {
  flex: 0 0 30px;
  height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--up-red-soft);
  color: var(--up-red);
  font-weight: 900;
  border-radius: 6px;
  font-size: 14px;
}

.up-trend-item a { font-weight: 700; font-size: 14.5px; line-height: 1.5; }

.up-trend-meta { font-size: 12px; color: var(--up-muted); font-weight: 600; margin-top: 2px; }

/* Pagination */
.up-pagination { margin: 28px 0 0; text-align: center; }
.up-pagination .nav-links { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.up-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  background: var(--up-white);
  border: 1.5px solid var(--up-line);
  border-radius: var(--up-radius-sm);
  font-weight: 800;
}
.up-pagination .page-numbers.current, .up-pagination .page-numbers:hover {
  background: var(--up-red);
  border-color: var(--up-red);
  color: #fff;
}

/* ==========================================================================
   4. SINGLE ARTICLE
   ========================================================================== */
.up-single { background: var(--up-white); border-radius: var(--up-radius); border: 1px solid var(--up-line); overflow: hidden; }

.up-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--up-slate);
  border-bottom: 1px solid var(--up-line);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--up-muted);
}

.up-crumbs a:hover { color: var(--up-red); }
.up-crumbs .sep { color: #D1D5DB; }

.up-single-hero { position: relative; }
.up-single-hero img { width: 100%; max-height: 480px; object-fit: cover; }

.up-single-body { padding: 24px 20px 30px; max-width: 780px; margin: 0 auto; }

.up-single-title { font-size: clamp(24px, 4.5vw, 34px); font-weight: 900; line-height: 1.35; margin: 14px 0 10px; }

.up-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  color: var(--up-muted);
  font-size: 13.5px;
  font-weight: 700;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--up-line);
  margin-bottom: 18px;
}

.up-single-content { font-size: 17.5px; line-height: 1.9; color: #1F2937; }
.up-single-content p { margin-bottom: 1.15em; }
.up-single-content h2, .up-single-content h3 { margin-top: 1.4em; }
.up-single-content img { border-radius: var(--up-radius-sm); }
.up-single-content blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 5px solid var(--up-red);
  background: var(--up-slate);
  border-radius: 0 var(--up-radius-sm) var(--up-radius-sm) 0;
  font-weight: 600;
}

.up-embed { position: relative; width: 100%; padding-top: 56.25%; margin: 18px 0; background: #000; border-radius: var(--up-radius-sm); overflow: hidden; }
.up-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.up-single-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--up-line);
}

.up-share-wa--big { min-height: 44px; padding: 8px 22px; font-size: 15px; }

.up-related { margin-top: 36px; }

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.up-footer { background: var(--up-dark); color: #9CA3AF; margin-top: 30px; }

.up-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding: 36px 0 24px;
}

.up-footer h4 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.up-footer a { color: #D1D5DB; }
.up-footer a:hover { color: var(--up-yellow); }
.up-footer ul { list-style: none; padding: 0; margin: 0; }
.up-footer li { padding: 4px 0; }

.up-footer-brand .up-brand-logo { font-size: 28px; }
.up-footer-brand p { font-size: 14px; line-height: 1.8; }

.up-footer-bottom {
  border-top: 1px solid #374151;
  padding: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.up-back-top {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 80;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--up-red);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--up-shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all .2s ease;
}

.up-back-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

/* ==========================================================================
   6. GENERIC / STATES / RESPONSIVE
   ========================================================================== */
.up-empty {
  background: var(--up-white);
  border: 1px dashed var(--up-line);
  border-radius: var(--up-radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--up-muted);
  font-weight: 600;
}

.up-skeleton { animation: upShimmer 1.4s infinite linear; background: linear-gradient(90deg, #EEF1F5 25%, #F8FAFC 50%, #EEF1F5 75%); }
@keyframes upShimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.up-no-results { padding: 40px 0; text-align: center; }

@media (max-width: 1024px) {
  .up-layout { grid-template-columns: 1fr; }
  .up-sidebar { order: 2; }
}

@media (max-width: 768px) {
  body { font-size: 15.5px; }
  .up-grid { grid-template-columns: 1fr; }
  .up-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--up-white); flex-direction: column; align-items: stretch; border-bottom: 2px solid var(--up-red); box-shadow: var(--up-shadow-lg); z-index: 60; }
  .up-menu.is-open { display: flex; }
  .up-menu a { border-bottom: 1px solid var(--up-line); padding: 10px 16px; }
  .up-nav { position: relative; }
  .up-nav-toggle { display: inline-flex; }
  .up-footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .up-topbar .up-edition { display: none; }
  .up-single-body { padding: 18px 14px 24px; }
}

@media (min-width: 769px) {
  .up-hero { display: grid; grid-template-columns: 1.15fr 1fr; }
  .up-hero-media { aspect-ratio: auto; min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .up-ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* Status tones (portal tables + badges) */
.up-badge--ok { background: var(--up-green-soft); color: var(--up-green); }
.up-badge--warn { background: #FEF3C7; color: #92400E; }
.up-badge--err { background: #FEE2E2; color: #991B1B; }
.up-badge--info { background: var(--up-blue-soft); color: var(--up-blue); }
.up-badge--muted { background: #EEF1F5; color: var(--up-muted); }

/* Multi-photo gallery (scroll-snap strip) */
.up-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 10px;
  margin: 0 0 6px;
}
.up-gallery-item {
  flex: 0 0 min(320px, 78vw);
  margin: 0;
  scroll-snap-align: start;
}
.up-gallery-item img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: var(--up-radius-sm);
  display: block;
}

/* Locally uploaded video (<=50MB) */
.up-embed--local { padding-top: 0; background: transparent; }
.up-embed--local video {
  width: 100%;
  max-height: 70vh;
  display: block;
  border-radius: var(--up-radius-sm);
  background: #000;
}

/* Approver byline (front cards + single meta) */
.up-card-approver {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--up-green);
}
.up-single-meta .up-approver { color: var(--up-green); }
.up-single-meta .up-approver--state { color: var(--up-blue); }

/* ==========================================================================
   10. v1.2 — DISTRICT BLOCKS (front page)
   ========================================================================== */
.up-district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}

.up-district-block {
  background: var(--up-white);
  border: 1px solid var(--up-line);
  border-radius: var(--up-radius);
  overflow: hidden;
  box-shadow: var(--up-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.up-district-block:hover {
  transform: translateY(-3px);
  box-shadow: var(--up-shadow-lg);
}

.up-district-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(90deg, var(--up-red) 0%, #B71C1C 100%);
  color: #fff;
}
.up-district-head h3 {
  margin: 0;
  color: #fff;
  font-size: 16.5px;
  font-weight: 900;
  letter-spacing: .2px;
}
.up-district-all {
  color: var(--up-yellow);
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}
.up-district-all:hover { color: #fff; }

.up-district-list { list-style: none; margin: 0; padding: 0; }
.up-district-list li { border-bottom: 1px solid var(--up-line); }
.up-district-list li:last-child { border-bottom: 0; }
.up-district-list a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
}
.up-district-list a:hover { background: var(--up-red-soft); }

.up-district-thumb { flex: 0 0 84px; }
.up-district-thumb img { width: 84px; height: 62px; object-fit: cover; border-radius: 6px; }
.up-district-thumb .up-card-placeholder { width: 84px; height: 62px; border-radius: 6px; font-size: 10px; }

.up-district-text { min-width: 0; }
.up-district-title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
  color: var(--up-dark);
}
.up-mini-video {
  display: inline-block;
  background: var(--up-red);
  color: #fff;
  font-size: 9px;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}
.up-district-meta { display: block; color: var(--up-muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.up-district-empty { padding: 18px 14px; color: var(--up-muted); font-weight: 600; font-size: 13.5px; margin: 0; }

/* ==========================================================================
   11. v1.2 — AUTHOR BOX + FOLLOW (single post)
   ========================================================================== */
.up-author-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--up-slate);
  border: 1px solid var(--up-line);
  border-radius: var(--up-radius);
  padding: 12px 14px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}

.up-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 60px;
  border: 3px solid var(--up-red);
  background: var(--up-white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.up-avatar img, .up-avatar .up-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.up-author-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.up-author-name { font-size: 15.5px; font-weight: 900; color: var(--up-dark); }
.up-author-geo { font-size: 12.5px; color: var(--up-red); font-weight: 700; }
.up-author-fans { font-size: 12.5px; color: var(--up-muted); font-weight: 700; }

.up-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--up-red);
  background: var(--up-red);
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all .18s ease;
}
.up-follow-btn:hover { background: var(--up-red-dark); border-color: var(--up-red-dark); color: #fff; }
.up-follow-btn.is-following { background: transparent; color: var(--up-green); border-color: var(--up-green); }
.up-follow-btn.is-following:hover { background: var(--up-green-soft); }
.up-follow-plus { font-weight: 900; }

/* ==========================================================================
   12. v1.2 — SHARE ROW (single post)
   ========================================================================== */
.up-share-label { display: block; font-weight: 800; font-size: 13.5px; color: var(--up-muted); margin-bottom: 8px; }
.up-share-row { display: flex; flex-wrap: wrap; gap: 8px; }

.up-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  border: 0;
  cursor: pointer;
  font-family: var(--up-font);
}
.up-share-btn:hover { opacity: .88; color: #fff; transform: translateY(-1px); }
.up-share-btn--wa { background: #16A34A; }
.up-share-btn--fb { background: #1877F2; }
.up-share-btn--x { background: #111827; }
.up-share-btn--tg { background: #229ED9; }
.up-share-btn--copy { background: #6B7280; }
.up-share-btn--native { background: var(--up-yellow); color: var(--up-dark); }
.up-share-btn--native:hover { color: var(--up-dark); }

/* ==========================================================================
   13. v1.2 — ADS (cards, sponsored box, strip)
   ========================================================================== */
.up-ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 14px;
}

.up-ad-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--up-white);
  border: 1.5px solid var(--up-yellow);
  border-radius: var(--up-radius);
  overflow: hidden;
  box-shadow: var(--up-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.up-ad-card:hover { transform: translateY(-3px); box-shadow: var(--up-shadow-lg); }

.up-ad-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--up-yellow);
  color: var(--up-dark);
  font-size: 10.5px;
  font-weight: 900;
  border-radius: 4px;
  padding: 2px 8px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.up-ad-media { display: block; aspect-ratio: 16 / 9; background: #FEF9E7; }
.up-ad-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-ad-pdf-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--up-muted);
  font-size: 14px;
}

.up-ad-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.up-ad-body strong { font-size: 14.5px; color: var(--up-dark); line-height: 1.4; }
.up-ad-body small { color: var(--up-muted); font-size: 12px; font-weight: 700; }

.up-ads-strip { border-top: 2px dashed var(--up-line); padding-top: 6px; }

.up-sponsored {
  margin: 26px 0;
  border: 1.5px dashed var(--up-yellow);
  border-radius: var(--up-radius);
  padding: 14px;
  background: #FFFDF4;
}
.up-sponsored-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  color: #92400E;
  margin-bottom: 10px;
  letter-spacing: .3px;
}

/* ==========================================================================
   14. v1.2 — पत्रकार बनें (apply) + विज्ञापन (advertise) pages
   ========================================================================== */
.up-apply-hero, .up-ads-hero {
  background: linear-gradient(135deg, var(--up-dark) 0%, #1E293B 100%);
  color: #fff;
  border-radius: var(--up-radius);
  padding: 30px 26px;
  margin-bottom: 20px;
  border-left: 8px solid var(--up-red);
}
.up-apply-hero h1, .up-ads-hero h1 { color: #fff; font-size: clamp(21px, 4vw, 30px); margin: 0 0 8px; }
.up-apply-hero p, .up-ads-hero p { color: #D1D5DB; font-weight: 600; margin: 0 0 12px; max-width: 720px; }

.up-apply-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.up-apply-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 700;
  color: #F1F5F9;
}
.up-apply-steps li span {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--up-red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 22px;
}

.up-apply-wrap, .up-ads-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.up-apply-form .up-panel-title { margin-bottom: 18px; }
.up-apply-pay-head { margin: 6px 0 2px; font-size: 14px; color: var(--up-dark); }
.up-field--hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

.up-apply-aside { display: flex; flex-direction: column; gap: 16px; }
.up-apply-checklist { list-style: none; margin: 0; padding: 0; }
.up-apply-checklist li {
  padding: 7px 0 7px 26px;
  position: relative;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px dashed var(--up-line);
}
.up-apply-checklist li:last-child { border-bottom: 0; }
.up-apply-checklist li::before { content: '✔'; position: absolute; left: 0; color: var(--up-green); font-weight: 900; }

.up-apply-earn { background: var(--up-dark); border-color: var(--up-dark); }
.up-apply-earn .up-panel-title { color: #fff; border-bottom-color: var(--up-yellow); }
.up-apply-earn p { color: #D1D5DB; font-size: 14px; }

.up-ads-split { display: flex; gap: 8px; flex-wrap: wrap; }
.up-ads-cta { max-width: 640px; }
.up-ads-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.up-apply-login-note { text-align: center; margin: 6px 0 0; font-weight: 700; font-size: 13.5px; color: var(--up-muted); }
.up-apply-login-note a { color: var(--up-red); }

.up-topbar-links { display: flex; gap: 14px; align-items: center; }

@media (max-width: 860px) {
  .up-apply-wrap, .up-ads-wrap { grid-template-columns: 1fr; }
  .up-topbar .up-container { flex-wrap: wrap; height: auto; padding-top: 4px; padding-bottom: 4px; }
  .up-topbar-links { display: flex; gap: 12px; flex-wrap: wrap; }
}
