/* ================================================================
   BharatLive — assets/css/main.css
   All global styles: tokens, reset, header, drawer, ticker,
   search flyout, cards, sidebar, footer, scroll-to-top
   ================================================================ */

/* ── CSS TOKENS ─────────────────────────────────────────────── */
/* Note: --primary / --accent / --primary-dim are injected inline
   by header.php from DB values. Fallbacks defined here. */
:root {
  /* Colour fallbacks (overridden by header.php inline style) */
  --primary:     #CC0000;
  --accent:      #FF6600;
  --primary-dim: rgba(204,0,0,0.10);
  --font-hi:     'Noto Sans Devanagari', sans-serif;
  --font-en:     'Outfit', sans-serif;

  /* ── LEGACY ALIASES — page CSS files use these old names ──────
     Defined here so all page-specific stylesheets resolve correctly
     without needing to rewrite every CSS file.                   */
  --font-hindi:    var(--font-hi);        /* old name → new name  */
  --font-head:     var(--font-display);   /* old name → new name  */
  --dark:          var(--ink);            /* old → new            */
  --dark2:         var(--ink2);
  --text:          var(--ink3);
  --ink-light:     var(--ink3);
  --white:         var(--bg);
  --paper:         var(--bg2);
  --smoke:         var(--bg3);
  --border-light:  var(--border);
  --shadow:        var(--sh-sm);
  --shadow-xs:     var(--sh-xs);
  --shadow-sm:     var(--sh-sm);
  --shadow-md:     var(--sh-md);
  --radius:        var(--r-md);

  /* Page colours */
  --bg:       #FFFFFF;
  --bg2:      #F7F7F7;
  --bg3:      #EEEEEE;
  --ink:      #0F0F0F;
  --ink2:     #2C2C2C;
  --ink3:     #525252;
  --muted:    #888888;
  --border:   #E6E6E6;
  --border2:  #CACACA;

  /* Dark topbar */
  --tb-bg:     #1a1a1a;
  --tb-text:   rgba(255,255,255,.55);
  --tb-text-h: rgba(255,255,255,.9);
  --tb-icon:   rgba(255,255,255,.45);
  --tb-sep:    rgba(255,255,255,.12);

  /* Layout */
  --topbar-h: 46px;
  --header-h: 74px;
  --drawer-w: 310px;

  /* Fonts — defaults; overridden by dynamic <style> injected from settings */
  --font-hi-s:    'Noto Serif Devanagari', serif;
  --font-ui:      var(--font-en);
  --font-display: 'Instrument Serif', Georgia, serif;

  /* Radii */
  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-full: 9999px;

  /* Shadows */
  --sh-xs: 0 1px 4px rgba(0,0,0,.06);
  --sh-sm: 0 2px 10px rgba(0,0,0,.08);
  --sh-md: 0 4px 22px rgba(0,0,0,.10);
  --sh-lg: 0 8px 36px rgba(0,0,0,.14);
  --sh-xl: 0 20px 60px rgba(0,0,0,.22);

  /* Easing */
  --ease:     cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(0,0,.2,1);
}

/* ── BASE RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  background: var(--bg2);
  color: var(--ink2);
  line-height: 1.65;
  min-width: 320px;
}
a   { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; height: auto; }
/* List reset — scoped to nav/UI only, NOT content areas */
nav ul, .sb-nav ul, .drawer-nav ul, .follow-grid ul,
.footer-col ul, .ticker-track, .mr-list, .most-read-list { list-style: none; }
/* Keep global reset for backwards compat but allow content overrides */
ul  { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; padding: 0; }

/* ── FONT SETTINGS: Serif Devanagari also sets --font-hi-s ───── */
body.font-hi-noto-serif-devanagari {
  --font-hi:   'Noto Serif Devanagari', serif;
  --font-hi-s: 'Noto Serif Devanagari', serif;
}
body.font-hi-mukta {
  --font-hi:   'Mukta', sans-serif;
  --font-hi-s: 'Mukta', sans-serif;
}

/* ── HEADER STYLES: compact / mega ──────────────────────────── */
body.header-compact .site-header { --header-h: 52px; }
body.header-compact .site-logo .logo-meta { display: none; }
body.header-compact .site-logo .logo-wordmark { font-size: 1.4rem; }
body.header-mega .site-header { box-shadow: 0 2px 0 var(--primary); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 28px);
}

/* ── READING PROGRESS ───────────────────────────────────────── */
#reading-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 99999; pointer-events: none;
  transition: width .1s linear;
}

/* ================================================================
   DARK TOPBAR
   ================================================================ */
.topbar {
  background: var(--tb-bg);
  min-height: var(--topbar-h);
  overflow: visible;
  border-bottom: 2px solid var(--primary);
  padding: 8px 0 6px;
}
/* Container inside topbar must be full height */
.topbar > .container {
  height: 100%;
  display: flex;
  align-items: stretch;
}
.topbar-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  width: 100%; height: 100%; gap: 8px;
}
.topbar-left {
  display: flex; align-items: center; gap: 0;
  font-size: .67rem; color: var(--tb-text);
  font-family: var(--font-ui);
}
.tb-item {
  display: flex; align-items: center; gap: 5px;
  padding: 0 12px 0 0; white-space: nowrap;
}
.tb-item:first-child { padding-left: 0; }
.tb-item i           { font-size: .58rem; color: var(--primary); opacity: .85; }
.tb-vline            { width: 1px; height: 13px; background: var(--tb-sep); margin-right: 12px; flex-shrink: 0; }

.topbar-right { display: flex; align-items: center; gap: 0; }
.tb-social    { display: flex; }
.tb-social a  {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: var(--topbar-h);
  color: var(--tb-icon); font-size: .67rem; transition: color .15s;
}
.tb-social a:hover { color: var(--tb-text-h); }

.tb-lang {
  display: flex; align-items: center; gap: 3px;
  padding-left: 10px; margin-left: 4px;
  border-left: 1px solid var(--tb-sep);
}
.tb-lang a {
  padding: 2px 9px; border-radius: var(--r-xs);
  font-size: .61rem; font-weight: 700; letter-spacing: .3px;
  color: var(--tb-text); border: 1px solid transparent;
  transition: all .15s; line-height: 1.6;
}
.tb-lang a.active             { background: var(--primary); color: #fff; border-color: var(--primary); }
.tb-lang a:not(.active):hover { color: var(--tb-text-h); border-color: var(--tb-sep); }

@media (max-width: 639px) { .topbar { display: none; } }

/* ================================================================
   STICKY HEADER
   ================================================================ */
.site-header {
  position: sticky; top: 0; z-index: 800;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--sh-xs);
  height: var(--header-h);
  padding-top: 6px;
}
/* Container inside header must be full height so flex children stretch */
.site-header > .container {
  height: 100%;
  display: flex;
  align-items: stretch;
}
.header-inner { display: flex; align-items: center; width: 100%; height: 100%; gap: 8px; }

/* Logo */
.site-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0; padding-right: 4px;
}
.logo-wordmark {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  color: var(--ink); line-height: 1; letter-spacing: -.4px; white-space: nowrap;
}
.logo-wordmark strong {
  color: var(--primary); font-style: normal;
  font-family: var(--font-ui); font-weight: 800;
}
.logo-divider { width: 1.5px; height: 26px; background: var(--border2); flex-shrink: 0; }
.logo-meta    { display: flex; flex-direction: column; gap: 1px; }
.logo-meta .lm-badge {
  font-size: .5rem; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase; color: var(--primary);
}
.logo-meta .lm-tag {
  font-size: .48rem; color: var(--muted);
  font-family: var(--font-hi); letter-spacing: .2px; white-space: nowrap;
}
@media (max-width: 900px) { .logo-divider, .logo-meta { display: none; } }
@media (max-width: 359px) { .logo-wordmark { font-size: 1.3rem; } }

/* Desktop nav */
.header-nav {
  flex: 1; display: flex; align-items: center;
  height: 100%; min-width: 0; overflow: hidden;
}
.header-nav a {
  display: flex; align-items: center; gap: 4px;
  padding: 0 11px; height: 100%;
  font-size: .69rem; font-weight: 600; letter-spacing: .25px;
  color: var(--ink3); text-transform: uppercase; white-space: nowrap;
  position: relative; transition: color .15s;
}
.header-nav a::after {
  content: ''; position: absolute;
  bottom: 0; left: 11px; right: 11px;
  height: 2px; background: var(--primary);
  border-radius: 1px 1px 0 0;
  transform: scaleX(0); transform-origin: center;
  transition: transform .2s var(--ease);
}
.header-nav a:hover            { color: var(--ink); }
.header-nav a:hover::after     { transform: scaleX(.65); }
.header-nav a.active           { color: var(--primary); font-weight: 700; }
.header-nav a.active::after    { transform: scaleX(1); }
.header-nav .nav-live-d {
  background: var(--primary); color: #fff !important;
  border-radius: var(--r-xs); margin: 14px 6px;
  padding: 0 12px !important;
  height: calc(var(--header-h) - 28px);
  font-size: .62rem; font-weight: 700;
}
.header-nav .nav-live-d::after  { display: none; }
.header-nav .nav-live-d:hover   { background: var(--accent) !important; }
@media (max-width: 1023px) { .header-nav { display: none; } }

/* Header right controls */
.header-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; margin-left: auto; }
.hdr-icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink3); border: 1px solid var(--border);
  font-size: .82rem; transition: all .15s; flex-shrink: 0;
}
.hdr-icon-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-dim); }

.hdr-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 15px; height: 38px; border-radius: var(--r-sm);
  font-size: .72rem; font-weight: 700; white-space: nowrap;
  transition: all .18s; font-family: var(--font-ui); flex-shrink: 0;
}
.hdr-btn.outline { border: 1px solid var(--border); color: var(--ink3); }
.hdr-btn.outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }
.hdr-btn.solid   { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
.hdr-btn.solid:hover {
  background: var(--accent); border-color: var(--accent); transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-dim);
}
@media (max-width: 767px) { .hdr-btn.outline { display: none; } }
@media (max-width: 479px) { .hdr-btn.solid   { display: none; } }

/* Hamburger */
.hamburger {
  width: 44px; height: 44px; display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  transition: border-color .2s, background .2s; flex-shrink: 0;
}
.hamburger:hover { border-color: var(--primary); background: var(--primary-dim); }
.hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--ink2); border-radius: 1px;
  transition: transform .28s var(--ease), opacity .2s;
}
.hamburger.open                 { border-color: var(--primary); background: var(--primary-dim); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4.7px,4.7px); background: var(--primary); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.7px,-4.7px); background: var(--primary); }
@media (max-width: 1023px) { .hamburger { display: flex; } }

/* ================================================================
   DRAWER OVERLAY + NAV DRAWER
   ================================================================ */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.42);
  z-index: 790; opacity: 0; pointer-events: none;
  transition: opacity .28s var(--ease);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: var(--drawer-w); max-width: 90vw;
  background: var(--bg); z-index: 800;
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform .3s var(--ease-out);
  box-shadow: var(--sh-xl);
  border-left: 3px solid var(--primary); overflow: hidden;
}
.nav-drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; min-height: 64px; height: 64px;
  flex-shrink: 0; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.drawer-logo {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.35rem; color: var(--ink); letter-spacing: -.3px; line-height: 1;
}
.drawer-logo strong { color: var(--primary); font-style: normal; font-family: var(--font-ui); font-weight: 800; }

.drawer-close {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink3); font-size: .9rem;
  transition: all .15s; flex-shrink: 0; background: var(--bg2);
}
.drawer-close:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }

.drawer-search {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg2); flex-shrink: 0;
}
.drawer-search form {
  display: flex; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); overflow: hidden;
  background: var(--bg); transition: border-color .2s;
}
.drawer-search form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.drawer-search input {
  flex: 1; min-width: 0; padding: 10px 14px;
  border: none; outline: none; font-size: .83rem;
  background: transparent; color: var(--ink); font-family: var(--font-ui);
}
.drawer-search input::placeholder { color: var(--muted); }
.drawer-search button {
  padding: 10px 14px; background: var(--primary);
  color: #fff; font-size: .8rem; transition: background .15s; flex-shrink: 0;
}
.drawer-search button:hover { background: var(--accent); }

.drawer-nav {
  flex: 1; overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; padding: 6px 0;
}
.drawer-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; height: 52px;
  font-size: .8rem; font-weight: 600; color: var(--ink3);
  text-transform: uppercase; letter-spacing: .4px;
  border-left: 3px solid transparent; margin-left: -3px;
  transition: all .15s; position: relative;
}
.drawer-nav a + a::before {
  content: ''; position: absolute;
  top: 0; left: 20px; right: 20px; height: 1px; background: var(--border);
}
.drawer-nav a:hover, .drawer-nav a.active {
  color: var(--primary); background: var(--primary-dim); border-left-color: var(--primary);
}
.drawer-nav a.active { font-weight: 700; }
.dn-icon { width: 20px; text-align: center; font-size: .7rem; color: var(--border2); flex-shrink: 0; transition: color .15s; }
.drawer-nav a:hover .dn-icon,
.drawer-nav a.active .dn-icon { color: var(--primary); }

.dn-live {
  margin: 10px 16px !important; height: 46px !important;
  background: var(--primary) !important; color: #fff !important;
  border-radius: var(--r-sm) !important; padding: 0 18px !important;
  border-left: none !important; margin-left: -3px !important;
  justify-content: center !important; text-transform: uppercase !important;
  letter-spacing: 1px !important; font-size: .75rem !important; font-weight: 800 !important;
}
.dn-live::before      { display: none !important; }
.dn-live:hover        { background: var(--accent) !important; border-left-color: transparent !important; }
.dn-live .dn-icon     { color: #fff !important; }

.drawer-footer { padding: 14px 16px 18px; border-top: 1px solid var(--border); background: var(--bg2); flex-shrink: 0; }
.df-btns       { display: flex; gap: 8px; margin-bottom: 12px; }
.df-btns a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; height: 40px; border-radius: var(--r-sm);
  font-size: .72rem; font-weight: 700;
  border: 1.5px solid var(--border); color: var(--ink3);
  transition: all .15s; background: var(--bg);
}
.df-btns a:hover     { border-color: var(--primary); color: var(--primary); }
.df-btns a.df-sub    { background: var(--primary); color: #fff; border-color: var(--primary); }
.df-btns a.df-sub:hover { background: var(--accent); border-color: var(--accent); }

.df-socials   { display: flex; justify-content: center; gap: 6px; }
.df-socials a {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .72rem; transition: all .15s; background: var(--bg);
}
.df-socials a:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-dim); }

@media (min-width: 1024px) { .nav-drawer, .drawer-overlay { display: none !important; } }

/* ================================================================
   SEARCH FLYOUT
   ================================================================ */
.search-flyout {
  position: fixed; inset: 0; background: rgba(0,0,0,.52);
  z-index: 900; display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(56px,10vh,90px) 16px 0;
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.search-flyout.open { opacity: 1; pointer-events: auto; }
.sf-box {
  width: 100%; max-width: 620px; background: var(--bg);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-xl); display: flex;
  transform: translateY(-14px) scale(.98);
  transition: transform .25s var(--ease-out);
}
.search-flyout.open .sf-box { transform: translateY(0) scale(1); }
.sf-box input {
  flex: 1; min-width: 0; padding: 18px 20px; font-size: 1rem;
  border: none; outline: none; color: var(--ink);
  font-family: var(--font-ui); background: transparent;
}
.sf-box input::placeholder { color: var(--muted); }
.sf-go     { padding: 18px 20px; background: var(--primary); color: #fff; font-size: .95rem; flex-shrink: 0; transition: background .15s; }
.sf-go:hover { background: var(--accent); }
.sf-close {
  position: fixed; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; border: 1px solid rgba(255,255,255,.2);
  transition: background .15s;
}
.sf-close:hover { background: rgba(255,255,255,.24); }

/* ================================================================
   BREAKING NEWS TICKER
   ================================================================ */
.ticker-wrap {
  display: flex; align-items: stretch;
  background: var(--bg); border-bottom: 1px solid var(--border);
  min-height: 38px; overflow: hidden;
}
.ticker-label {
  display: flex; align-items: center; gap: 7px;
  padding: 0 24px 0 16px;
  background: var(--primary); color: #fff;
  font-size: .62rem; font-weight: 800; letter-spacing: 1.8px;
  text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}
.ticker-label i { animation: t-blink .9s infinite; font-size: .5rem; }
@keyframes t-blink { 0%,100%{opacity:1} 50%{opacity:.1} }

.ticker-scroll {
  flex: 1; overflow: hidden;
  display: flex; align-items: center; position: relative;
  mask-image: linear-gradient(to right, transparent 0px, #000 20px, #000 calc(100% - 20px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0px, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.ticker-track {
  display: inline-flex; white-space: nowrap;
  animation: ticker-go 55s linear infinite; align-items: center;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-flex; align-items: center;
  gap: 8px; padding-right: 36px;
  font-size: .74rem; color: var(--ink3);
}
.t-dot       { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.ticker-item a       { color: var(--ink3); transition: color .15s; }
.ticker-item a:hover { color: var(--primary); }
@keyframes ticker-go { 0%{ transform: translateX(0); } 100%{ transform: translateX(-50%); } }

@media (max-width: 479px) {
  .ticker-label { font-size: .58rem; letter-spacing: 1px; padding-right: 20px; }
  .ticker-item  { font-size: .7rem; padding-right: 26px; }
}

/* Live dot */
.live-dot {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  animation: live-p 1.1s ease-in-out infinite; flex-shrink: 0;
}
@keyframes live-p { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(.65)} }

/* ================================================================
   SHARED UI COMPONENTS
   ================================================================ */
.sec-title {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; font-size: .7rem; font-weight: 800;
  letter-spacing: 2.8px; text-transform: uppercase; color: var(--ink);
}
.sec-title::before {
  content: ''; display: block; width: 3px; height: 18px;
  background: var(--primary); border-radius: 2px; flex-shrink: 0;
}
.sec-title .sec-sub {
  font-size: .65rem; font-weight: 500; letter-spacing: .4px;
  color: var(--muted); text-transform: none;
  border-left: 1px solid var(--border); padding-left: 10px; margin-left: 2px;
}
.cat-badge {
  display: inline-block; padding: 2px 9px; border-radius: var(--r-xs);
  font-size: .57rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .7px; color: #fff; background: var(--primary); white-space: nowrap;
}
.tag-pill {
  display: inline-block; padding: 5px 13px;
  border: 1px solid var(--border); border-radius: var(--r-full);
  font-size: .68rem; color: var(--muted); transition: all .18s;
}
.tag-pill:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }

.alert         { padding: 11px 16px; border-radius: var(--r-md); font-size: .83rem; margin-bottom: 14px; }
.alert-success { background: #edf7ee; color: #276131; border: 1px solid #b2dfb9; }
.alert-error   { background: #fceef0; color: #b71c1c; border: 1px solid #f5c0c4; }

/* News card (vertical) */
.news-card {
  background: var(--bg); border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--sh-xs);
  display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.news-card:hover              { transform: translateY(-4px); box-shadow: var(--sh-md); }
.news-card .thumb             { position: relative; padding-top: 56%; overflow: hidden; flex-shrink: 0; }
.news-card .thumb img         { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .thumb img   { transform: scale(1.06); }
.news-card .thumb .cat-badge  { position: absolute; top: 10px; left: 10px; z-index: 1; }
.news-card .card-body         { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.news-card h3                 { font-family: var(--font-hi-s); font-size: .93rem; line-height: 1.55; color: var(--ink); flex: 1; }
.news-card h3 a:hover         { color: var(--primary); }
.news-card .meta              { font-size: .63rem; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.news-card .meta i            { color: var(--primary); font-size: .58rem; }

/* Horizontal card */
.h-card {
  display: flex; background: var(--bg); border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--sh-xs);
  transition: box-shadow .2s, transform .2s;
}
.h-card:hover              { box-shadow: var(--sh-sm); transform: translateY(-2px); }
.h-card .thumb             { flex: 0 0 88px; height: 68px; overflow: hidden; }
.h-card .thumb img         { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.h-card:hover .thumb img   { transform: scale(1.08); }
.h-card .info              { flex: 1; min-width: 0; padding: 9px 13px; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.h-card .info h4           { font-family: var(--font-hi); font-size: .8rem; line-height: 1.42; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-card .info h4 a:hover   { color: var(--primary); }
.h-card .info .meta        { font-size: .61rem; color: var(--muted); display: flex; gap: 6px; }

.no-img { position: absolute; inset: 0; background: var(--bg3); display: flex; align-items: center; justify-content: center; color: var(--border2); font-size: 1.8rem; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1024px) { .sidebar { position: sticky; top: calc(var(--header-h) + var(--topbar-h) + 14px); } }

.sw        { background: var(--bg); border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--sh-xs); overflow: hidden; }
.sw-title  {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  font-size: .66rem; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--ink); border-bottom: 1px solid var(--border); background: var(--bg2);
}
.sw-title i { color: var(--primary); font-size: .7rem; }

.mr-list li         { border-bottom: 1px solid var(--border); list-style: none; }
.mr-list li:last-child { border-bottom: none; }
.mr-item            { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; transition: background .15s; }
.mr-item:hover      { background: var(--bg2); }
.mr-num             { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--bg3); line-height: 1; flex-shrink: 0; width: 24px; transition: color .18s; }
.mr-item:hover .mr-num          { color: var(--primary); }
.mr-list li:first-child .mr-num { color: var(--primary); }
.mr-info h4         { font-family: var(--font-hi); font-size: .8rem; line-height: 1.4; color: var(--ink); }
.mr-info h4 a:hover { color: var(--primary); }
.mr-info .meta      { font-size: .61rem; color: var(--muted); margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }

.nl-body          { padding: 16px; }
.nl-body p        { font-size: .8rem; color: var(--muted); margin-bottom: 12px; font-family: var(--font-hi); line-height: 1.65; }
.nl-input-wrap    { display: flex; flex-direction: column; gap: 8px; }
.nl-input-wrap input {
  width: 100%; padding: 9px 14px; border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: .82rem; outline: none;
  background: var(--bg2); color: var(--ink);
  transition: border-color .2s, box-shadow .2s; font-family: var(--font-ui);
}
.nl-input-wrap input:focus  { border-color: var(--primary); background: var(--bg); box-shadow: 0 0 0 3px var(--primary-dim); }
.nl-input-wrap button {
  width: 100%; padding: 10px; background: var(--primary); color: #fff;
  border-radius: var(--r-sm); font-weight: 700; font-size: .82rem;
  transition: background .18s, transform .1s;
}
.nl-input-wrap button:hover { background: var(--accent); transform: translateY(-1px); }

.follow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
.follow-btn  {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 6px; border-radius: var(--r-sm);
  color: #fff; font-size: .7rem; font-weight: 700;
  transition: opacity .18s, transform .12s;
}
.follow-btn:hover { opacity: .84; transform: translateY(-1px); }

/* Ad placeholder */
.ad-placeholder {
  border: 2px dashed var(--border); border-radius: var(--r-lg);
  background: var(--bg2); padding: 24px 16px;
  text-align: center; color: var(--muted); font-size: .75rem;
}
.ad-placeholder i { font-size: 1.8rem; color: var(--border); display: block; margin-bottom: 8px; }

/* Scroll to top */
#scrollTop {
  position: fixed; bottom: 20px; right: 16px; z-index: 600;
  width: 42px; height: 42px; background: var(--ink); color: #fff;
  border-radius: var(--r-md); font-size: .82rem;
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--sh-md); transition: background .2s, transform .2s;
}
#scrollTop:hover    { background: var(--primary); transform: translateY(-3px); }
#scrollTop.show     { display: flex; }
@media (max-width: 479px) { #scrollTop { bottom: 14px; right: 12px; width: 38px; height: 38px; } }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer { background: #111; color: #999; margin-top: 40px; }
.footer-top  {
  padding: 40px 0 30px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px;
}
@media(max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media(max-width: 480px) { .footer-top { grid-template-columns: 1fr; gap: 24px; } }

.footer-logo        { font-family: var(--font-display); font-style: italic; font-size: 1.9rem; color: #fff; display: block; margin-bottom: 10px; }
.footer-logo strong { color: var(--primary); font-style: normal; font-family: var(--font-ui); font-weight: 800; }
.brand-col p        { font-size: .8rem; line-height: 1.75; color: #888; font-family: var(--font-hi); }

.footer-social   { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: #222; color: #888; font-size: .85rem; transition: all .2s;
}
.footer-social a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

.footer-col h4 {
  color: #fff; font-size: .85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid #272727;
}
.footer-col ul li         { margin-bottom: 8px; }
.footer-col ul li a       { font-size: .78rem; color: #888; transition: color .2s; display: flex; align-items: center; gap: 7px; }
.footer-col ul li a i     { color: var(--primary); font-size: .7rem; }
.footer-col ul li a:hover { color: var(--accent); }

.footer-contact { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.fc-item        { display: flex; gap: 10px; align-items: flex-start; font-size: .78rem; color: #888; }
.fc-item i      { color: var(--primary); margin-top: 3px; flex-shrink: 0; width: 14px; }
.fc-item a      { color: #888; transition: color .2s; }
.fc-item a:hover { color: var(--accent); }

.footer-nl p   { font-size: .75rem; color: #777; margin-bottom: 8px; font-family: var(--font-hi); }
.fnl-form      { display: flex; }
.fnl-form input {
  flex: 1; padding: 7px 10px; background: #1e1e1e;
  border: 1px solid #333; border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  color: #ccc; font-size: .75rem; outline: none; min-width: 0;
}
.fnl-form input::placeholder { color: #555; }
.fnl-form button {
  padding: 7px 12px; background: var(--primary); color: #fff; border: none;
  border-radius: 0 var(--r-sm) var(--r-sm) 0; transition: background .2s;
}
.fnl-form button:hover { background: var(--accent); }

.footer-bottom {
  border-top: 1px solid #1e1e1e; padding: 14px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .73rem; color: #555; flex-wrap: wrap; gap: 8px;
}
/* ================================================================
   PROSE CONTENT — policy pages, about, static pages
   ================================================================ */
.prose-content {
  font-size: .97rem;
  line-height: 1.88;
  color: #2c2c2c;
  font-family: var(--font-hi);
}
.prose-content p  { margin-bottom: 1.2em; }
.prose-content h2 { font-size: 1.3rem; font-weight: 700; margin: 1.8em 0 .7em; color: var(--ink); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.prose-content h3 { font-size: 1.1rem; font-weight: 700; margin: 1.5em 0 .6em; color: var(--ink); }
.prose-content h4 { font-size: 1rem; font-weight: 700; margin: 1.2em 0 .5em; color: var(--ink); }
.prose-content ul { list-style: disc !important; padding-left: 1.8em !important; margin-bottom: 1.2em !important; }
.prose-content ol { list-style: decimal !important; padding-left: 1.8em !important; margin-bottom: 1.2em !important; }
.prose-content li { display: list-item !important; margin-bottom: .45em; }
.prose-content a  { color: var(--primary); text-decoration: underline; }
.prose-content a:hover { color: var(--accent); }
.prose-content strong { font-weight: 700; color: var(--ink); }
.prose-content blockquote { border-left: 4px solid var(--primary); margin: 1.4em 0; padding: 12px 18px; background: var(--bg2); font-style: italic; color: var(--muted); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.prose-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.4em; }
.prose-content th { background: var(--bg2); padding: 10px 14px; font-size: .82rem; font-weight: 700; text-align: left; border: 1px solid var(--border); }
.prose-content td { padding: 9px 14px; font-size: .85rem; border: 1px solid var(--border); vertical-align: top; }
.prose-content tr:nth-child(even) td { background: var(--bg2); }
.prose-content hr { border: none; border-top: 2px solid var(--border); margin: 2em 0; }
.prose-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: .85em; font-family: 'Courier New', monospace; }
.prose-content pre { background: #1a1a1a; color: #f8f8f8; padding: 14px 18px; border-radius: var(--r-md); font-size: .82rem; overflow-x: auto; margin-bottom: 1.4em; }
.prose-content img { max-width: 100%; border-radius: var(--r-md); margin: 1em 0; box-shadow: var(--sh-sm); }

/* ================================================================
   STATIC / POLICY PAGE SHARED LAYOUT
   ================================================================ */
.static-page-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px clamp(16px, 4vw, 28px) 60px;
}
.static-page-hero {
  margin-bottom: 32px;
}
.static-page-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.25;
}
.static-page-hero .hero-bar {
  height: 3px;
  width: 56px;
  background: var(--primary);
  border-radius: 2px;
  margin-bottom: 10px;
}
.static-page-hero .hero-meta {
  font-size: .78rem;
  color: var(--muted);
}
.static-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.static-breadcrumb a { color: var(--muted); transition: color .15s; }
.static-breadcrumb a:hover { color: var(--primary); }
.static-breadcrumb .sep { color: var(--border2); }

/* ================================================================
   MAINTENANCE MODE BANNER
   ================================================================ */
.maintenance-banner {
  background: linear-gradient(135deg, #cc0000, #ff4400);
  color: #fff;
  text-align: center;
  padding: 16px;
  font-size: .88rem;
  font-weight: 600;
}

/* ================================================================
   GLOBAL AD ZONES
   ================================================================ */
.ad-zone { text-align: center; margin: 16px 0; overflow: hidden; }
.ad-zone.ad-after-title { margin: 12px 0 20px; }
.ad-zone.ad-in-article  { margin: 20px 0; clear: both; }

/* ================================================================
   SKIP TO CONTENT (accessibility)
   ================================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-weight: 700;
  z-index: 99999;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 8px; }