/* ==========================================================================
   Bihar Vikas Darpan — stylesheet
   Palette: warm paper, deep indigo ink, terracotta-saffron accent
   Motif: Madhubani-style double lines, suns and dotted borders
   ========================================================================== */
:root {
  --paper: #FBF7F0;
  --surface: #FFFFFF;
  --surface-2: #F4EEE3;
  --ink: #1B1A3A;
  --ink-2: #34325A;
  --muted: #6B6880;
  --line: #E7DFD1;
  --accent: #C2410C;
  --accent-ink: #FFFFFF;
  --accent-soft: #FDEBDD;
  --green: #1D4ED8;
  --gold: #C99200;
  --dark-bg: #16152B;
  --shadow: 0 1px 2px rgba(27,26,58,.06), 0 8px 24px -12px rgba(27,26,58,.18);
  --shadow-lg: 0 24px 48px -20px rgba(27,26,58,.35);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hindi: "Tiro Devanagari Hindi", "Noto Sans Devanagari", serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #11101F;
  --surface: #1B1A2F;
  --surface-2: #232139;
  --ink: #F4EFE6;
  --ink-2: #D8D2C6;
  --muted: #A29EB6;
  --line: #2F2C48;
  --accent: #F2702E;
  --accent-soft: #3A2218;
  --dark-bg: #0B0A16;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
mark { background: color-mix(in srgb, var(--gold) 35%, transparent); color: inherit; padding: 0 .15em; border-radius: 3px; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; background: var(--surface-2); padding: .1em .4em; border-radius: 5px; }
.hindi { font-family: var(--font-hindi); }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 2.5rem; }
.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(860px, 100% - 32px); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 999; background: var(--accent); color: #fff; padding: .5rem 1rem; border-radius: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  padding: .75rem 1.25rem; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .95rem/1 var(--font-body); cursor: pointer; transition: transform .2s var(--ease), background .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -8px var(--accent); }
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: #FDE8E8; color: #B42318; }
:root[data-theme="dark"] .btn-danger { background: #3B1717; color: #FCA5A5; }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }
.btn-block { width: 100%; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: .2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); transform: rotate(-8deg); }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: var(--shadow); }
.topbar { background: var(--ink); color: var(--paper); font-size: .8rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; }
.topbar a:hover { color: var(--gold); }
.site-header.scrolled .topbar { display: none; }
.nav { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand-mark { width: 44px; height: 44px; flex: none; transition: transform .8s var(--ease); }
.brand:hover .brand-mark { transform: rotate(90deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font: 800 1.25rem/1 var(--font-display); }
.brand-text em { font: italic 600 1.05rem/1.1 var(--font-display); color: var(--accent); }
.brand-text small { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.nav-links { display: flex; gap: .25rem; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links > li > a { display: block; padding: .6rem .9rem; border-radius: 999px; font-weight: 600; font-size: .95rem; position: relative; }
.nav-links > li > a.active { background: var(--accent-soft); color: var(--accent); }
.nav-actions { display: flex; gap: .5rem; }
.menu-btn { display: none; }
.has-mega { position: relative; }
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0; width: 620px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .25rem; padding: .75rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .25s var(--ease);
}
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega a { display: flex; gap: .75rem; align-items: center; padding: .6rem .75rem; border-radius: 10px; font-weight: 600; font-size: .92rem; }
.mega a i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.mega a small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.mega a:hover { background: var(--surface-2); color: var(--ink); }

/* ----------------------------------------------------------------- ticker */
.ticker { background: var(--accent); color: #fff; overflow: hidden; }
.ticker-inner { display: flex; align-items: center; gap: 1rem; }
.ticker-label { flex: none; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; padding: .55rem 1rem .55rem 0; border-right: 1px solid rgba(255,255,255,.35); }
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-move { display: flex; gap: 3rem; width: max-content; animation: ticker 60s linear infinite; padding: .55rem 0; font-size: .9rem; font-weight: 500; }
.ticker-move a { position: relative; }
.ticker-move a::before { content: "✦"; position: absolute; left: -1.85rem; opacity: .6; }
.ticker-move a:hover { color: #FFE8A3; }
.ticker:hover .ticker-move { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------- hero */
.hero, .page-hero, .article-hero { position: relative; overflow: hidden; }
.hero-pattern {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 0),
    radial-gradient(600px 400px at 85% 10%, color-mix(in srgb, var(--c, var(--accent)) 18%, transparent), transparent 70%),
    radial-gradient(500px 400px at 0% 100%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 70%);
  background-size: 22px 22px, auto, auto;
}
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-grid > * { min-width: 0; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--accent); margin-bottom: .8rem; }
.eyebrow a:hover { text-decoration: underline; }
.hero h1 .ink { color: var(--accent); font-style: italic; position: relative; white-space: nowrap; }
.hero h1 .ink::after { content: ""; position: absolute; left: 0; right: 0; bottom: .05em; height: .14em; background: var(--gold); opacity: .45; border-radius: 4px; z-index: -1; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--ink-2); max-width: 60ch; }
.hero-search { display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: .35rem .35rem .35rem 1.2rem; margin: 1.8rem 0; box-shadow: var(--shadow); max-width: 540px; transition: border-color .2s; }
.hero-search:focus-within { border-color: var(--accent); }
.hero-search i { color: var(--muted); }
.hero-search input { flex: 1; border: 0; background: none; font: inherit; color: var(--ink); outline: none; min-width: 0; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 560px; }
.hero-stats div { border-left: 3px solid var(--accent); padding-left: .75rem; }
.hero-stats strong { display: block; font: 800 1.9rem/1 var(--font-display); }
.hero-stats span { font-size: .8rem; color: var(--muted); }

.hero-slider { position: relative; min-height: 440px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--dark-bg); }
.slide { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; opacity: 0; transform: scale(1.03); transition: opacity .8s var(--ease), transform 1.2s var(--ease); pointer-events: none; }
.slide.active { opacity: 1; transform: none; pointer-events: auto; }
.slide-art { position: absolute; inset: 0; background:
  radial-gradient(circle at 75% 25%, color-mix(in srgb, var(--c) 90%, #fff 10%) 0, var(--c) 30%, color-mix(in srgb, var(--c) 40%, #0b0a16) 75%);
  display: grid; place-items: center; }
.slide-art::before { content: ""; position: absolute; inset: 0; background-image: repeating-radial-gradient(circle at 75% 25%, rgba(255,255,255,.08) 0 2px, transparent 2px 28px); }
.slide-art i { font-size: 9rem; opacity: .22; position: absolute; top: 12%; right: 10%; transform: rotate(-8deg); }
.slide-body { position: relative; padding: 2rem; background: linear-gradient(transparent, rgba(11,10,22,.88) 45%); }
.slide-body h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: #fff; }
.slide-body p { color: rgba(255,255,255,.85); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide-body .meta { color: rgba(255,255,255,.7); font-size: .85rem; }
.slider-dots { position: absolute; top: 1.2rem; right: 1.2rem; display: flex; gap: .4rem; z-index: 2; }
.slider-dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; background: rgba(255,255,255,.45); cursor: pointer; transition: .3s; padding: 0; }
.slider-dots button.active { width: 28px; background: #fff; }

.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: var(--c, var(--accent)); color: #fff; }
.chip-lg { font-size: .85rem; padding: .45rem .9rem; margin-bottom: 1rem; }
.chip-lg:hover { color: #fff; filter: brightness(1.08); }
.chip-sm { font-size: .7rem; padding: .2rem .55rem; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }

/* --------------------------------------------------------------- sections */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-tint { background: var(--surface-2); }
.section-dark { background: var(--dark-bg); color: #F4EFE6; }
.section-dark .eyebrow { color: #F7A070; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.link-arrow { font-weight: 700; display: inline-flex; gap: .4rem; align-items: center; }
.link-arrow i { transition: transform .2s; }
.link-arrow:hover i { transform: translateX(4px); }

.highlights { padding-top: 0; padding-bottom: 0; margin-top: -1rem; }
.highlight-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ink); color: var(--paper); border-radius: 24px; overflow: hidden; position: relative; }
.highlight-grid::before { content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(255,255,255,.18); border-radius: 18px; pointer-events: none; }
.highlight { padding: 2rem 1.5rem; text-align: center; border-right: 1px solid rgba(255,255,255,.1); }
.highlight:last-child { border-right: 0; }
.highlight i { font-size: 1.4rem; color: var(--gold); margin-bottom: .6rem; }
.highlight strong { display: block; font: 800 2.2rem/1.1 var(--font-display); }
.highlight > span { font-size: .85rem; opacity: .75; }
:root[data-theme="dark"] .highlight-grid { background: var(--surface); color: var(--ink); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.cat-tile {
  position: relative; display: flex; flex-direction: column; gap: .25rem; padding: 1.3rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.cat-tile::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 100px; height: 100px; border-radius: 50%; border: 10px double color-mix(in srgb, var(--c) 22%, transparent); transition: transform .5s var(--ease); }
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--c); color: var(--ink); }
.cat-tile:hover::after { transform: scale(1.4) rotate(45deg); }
.cat-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); margin-bottom: .6rem; transition: .3s; }
.cat-tile:hover .cat-icon { background: var(--c); color: #fff; }
.cat-name { font-weight: 700; }
.cat-hi { font-size: .85rem; color: var(--muted); }
.cat-count { font-size: .78rem; font-weight: 600; color: var(--c); margin-top: .4rem; }

/* ------------------------------------------------------------------ cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-item { display: contents; }
.grid-item.hide { display: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 16/9; display: block; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card-art { position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #1B1A3A)); }
.card-art::before { content: ""; position: absolute; inset: 10px; border: 1.5px solid rgba(255,255,255,.3); border-radius: 10px; outline: 1.5px solid rgba(255,255,255,.15); outline-offset: 4px; }
.card-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.18) 1px, transparent 0); background-size: 14px 14px; }
.card-art i { font-size: 3.2rem; opacity: .9; transition: transform .6s var(--ease); position: relative; z-index: 1; filter: drop-shadow(0 6px 12px rgba(0,0,0,.25)); }
.card:hover .card-art i, .card:hover .card-media img { transform: scale(1.12) rotate(-4deg); }
.card-media .chip { position: absolute; left: 12px; top: 12px; z-index: 2; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.12rem; }
.card-body p { color: var(--muted); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .8rem; color: var(--muted); margin-bottom: .6rem; }
.meta i { margin-right: .2rem; }
.meta-lg { font-size: .9rem; }
.read-more { margin-top: auto; font-weight: 700; font-size: .88rem; color: var(--c); display: inline-flex; gap: .4rem; align-items: center; }
.read-more i { transition: transform .2s; }
.card:hover .read-more i { transform: translateX(4px); }

.filter-pills, .cat-scroller { display: flex; gap: .5rem; flex-wrap: wrap; }
.cat-scroller { margin-bottom: 2rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
.pill { --c: var(--ink); flex: none; display: inline-flex; gap: .4rem; align-items: center; padding: .5rem 1rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .85rem var(--font-body); cursor: pointer; transition: .2s; }
.pill i { color: var(--c); }
.pill:hover { border-color: var(--c); color: var(--ink); }
.pill.active { background: var(--c); border-color: var(--c); color: #fff; }
.pill.active i { color: #fff; }
:root[data-theme="dark"] .pill:not([style]).active { background: var(--ink); color: var(--paper); }

/* ---------------------------------------------------------- timeline chart */
.timeline-chart { display: flex; align-items: flex-end; gap: .6rem; height: 240px; padding: 1.5rem 1.5rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.bar { flex: 1 0 44px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .3rem; padding-bottom: 3.2rem; position: relative; }
.bar-fill { width: 100%; max-width: 44px; height: 0; border-radius: 8px 8px 3px 3px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 60%, var(--gold))); transition: height 1s var(--ease); }
.timeline-chart.in .bar-fill { height: var(--h); }
.bar:hover .bar-fill { filter: brightness(1.15); }
.bar-val { font-weight: 700; font-size: .85rem; }
.bar-label { position: absolute; bottom: .6rem; font-size: .78rem; font-weight: 600; text-align: center; line-height: 1.2; }
.bar-label small { display: block; color: var(--muted); font-weight: 400; }

/* -------------------------------------------------------------- videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.5rem; }
.section-dark .card { background: #201F38; border-color: #2F2C48; color: #F4EFE6; }
.section-dark .card p, .section-dark .meta { color: #A29EB6; }
.video-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16/9; padding: 0; border: 0; cursor: pointer; background: #000; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; opacity: .9; }
.video-thumb:hover img { transform: scale(1.06); opacity: .7; }
.video-thumb .chip { position: absolute; left: 12px; top: 12px; }
.play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.95); color: #E03131; font-size: 1.4rem; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .3s var(--ease); }
.play i { margin-left: 4px; }
.video-thumb:hover .play { transform: scale(1.12); }
.play::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); animation: pulse 2s infinite; }
@keyframes pulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.video-card .meta { justify-content: space-between; margin: auto 0 0; }
.video-card .meta a:hover { color: #E03131; }
.video-modal { position: fixed; inset: 0; z-index: 200; background: rgba(8,7,18,.92); display: grid; place-items: center; padding: 1rem; animation: fade .25s; }
.video-modal[hidden] { display: none; }
.video-modal-inner { width: min(1000px, 100%); position: relative; }
.video-frame { aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-modal h3 { color: #fff; margin-top: 1rem; }
.video-close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.howto { margin-top: 3rem; padding: 1.5rem; border-radius: var(--radius); border: 1.5px dashed var(--line); background: var(--surface); }
.howto h3 i { color: var(--accent); }
.page-hero-dark { background: var(--dark-bg); color: #F4EFE6; }
.page-hero-dark .lead { color: rgba(244,239,230,.8); }
.page-hero-dark h1 i { color: #FF4D4D; }


/* ------------------------------------------------------------- page hero */
.page-hero { padding: clamp(2.5rem, 5vw, 4rem) 0; border-bottom: 1px solid var(--line); }
.page-hero .container { position: relative; }
.page-hero h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.page-hero h1 > i { color: var(--c, var(--accent)); font-size: .8em; }
.page-hero h1 .sub { font-size: .5em; color: var(--muted); font-weight: 400; }

.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.field { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 1.1rem; }
.field.grow { flex: 1 1 260px; }
.field input { flex: 1; border: 0; background: none; padding: .75rem 0; font: inherit; color: var(--ink); outline: none; }
.field i { color: var(--muted); }
select, .form input, .form textarea, .form select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .9rem;
}
.toolbar select { border-radius: 999px; padding: .7rem 2.2rem .7rem 1rem; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6880' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; }
select:focus, .form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; margin-top: 3rem; }
.pager a { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 .6rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.pager a.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty i { font-size: 2.5rem; margin-bottom: 1rem; opacity: .5; }

/* --------------------------------------------------------------- article */
.progress-bar { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--c); z-index: 100; transition: width .1s; }
.article-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2.5rem; border-bottom: 1px solid var(--line); }
.article-hero .container { position: relative; }
.article-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.standfirst { font: 500 clamp(1.1rem, 1.8vw, 1.35rem)/1.5 var(--font-display); color: var(--ink-2); }
.article-layout { display: grid; grid-template-columns: 1fr 230px; gap: 3rem; padding-top: 2.5rem; padding-bottom: 2rem; }
.article-body { font-size: 1.08rem; line-height: 1.8; }
.article-body > p:first-of-type::first-letter { font: 800 3.6em/.8 var(--font-display); float: left; margin: .08em .12em 0 0; color: var(--c, var(--accent)); }
.article-img { border-radius: var(--radius); margin-bottom: 1.5rem; }
.source-box { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; margin: 2rem 0; background: var(--surface-2); border-left: 4px solid var(--c, var(--accent)); border-radius: 0 12px 12px 0; font-size: .95rem; }
.source-box > i { font-size: 1.2rem; color: var(--c, var(--accent)); }
.source-box strong { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.source-box a { font-weight: 600; word-break: break-word; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.tags a { font-size: .82rem; padding: .3rem .75rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-weight: 500; }
.tags a:hover { background: var(--accent); color: #fff; }
.share { display: flex; align-items: center; gap: .5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.share span { font-weight: 700; margin-right: .5rem; font-size: .9rem; }
.share a, .share button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: .2s; }
.share a:hover, .share button:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.article-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 100px; align-self: start; }
.side-card { padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; }
.side-card h4 { font-family: var(--font-body); font-size: .9rem; }
.side-card h4 i { color: var(--accent); }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-bottom: 3rem; }
.prev-next a { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 600; font-family: var(--font-display); transition: .2s; }
.prev-next a:hover { border-color: var(--c); color: var(--ink); }
.prev-next small { display: block; font: 600 .75rem var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .3rem; }
.prev-next .right { text-align: right; grid-column: 2; }

.inline { display: inline; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }

/* ------------------------------------------------------------ search overlay */
.search-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(17,16,31,.55); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 1rem 1rem; animation: fade .2s; }
.search-overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.search-panel { width: min(680px, 100%); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: drop .3s var(--ease); }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }
.search-form { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.search-form i { color: var(--accent); font-size: 1.1rem; }
.search-form input { flex: 1; border: 0; background: none; font: 500 1.1rem var(--font-body); color: var(--ink); outline: none; }
.search-results { max-height: 60vh; overflow-y: auto; padding: 1rem 1.3rem; }
.search-results h5 { font: 700 .72rem var(--font-body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: .5rem 0; }
.search-results a.res { display: block; padding: .7rem .8rem; border-radius: 10px; margin: 0 -.8rem; }
.search-results a.res:hover, .search-results a.res.focus { background: var(--surface-2); color: var(--ink); }
.search-results a.res strong { display: block; font-weight: 600; }
.search-results a.res small { color: var(--muted); font-size: .8rem; }
.search-results a.res .snip { display: block; color: var(--ink-2); font-size: .85rem; margin-top: .2rem; }
.search-results .all { display: block; text-align: center; padding: .8rem; font-weight: 700; color: var(--accent); }
.search-results p a { color: var(--accent); font-weight: 600; }

/* ------------------------------------------------------------- forms/admin */
.auth { display: grid; place-items: center; min-height: 60vh; }
.auth-card { width: min(420px, 100% - 32px); text-align: center; padding: 2.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); }
.auth-icon { font-size: 1.6rem; width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 1rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.error-code { font: 800 5rem/1 var(--font-display); color: var(--accent); margin: 0; }
.form { display: flex; flex-direction: column; gap: 1.1rem; text-align: left; }
.form label { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: .9rem; }
.form label small { font-weight: 400; color: var(--muted); }
.form textarea { resize: vertical; line-height: 1.5; }
.form-card { padding: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; margin-top: 1.5rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.checks { display: flex; flex-direction: column; gap: .5rem; }
.form .check { flex-direction: row; align-items: center; gap: .6rem; font-weight: 500; }
.form .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-actions { display: flex; gap: .6rem; padding-top: .5rem; }
.yt-preview { display: flex; align-items: center; gap: 1rem; padding: .6rem; background: var(--surface-2); border-radius: 12px; }
.yt-preview[hidden] { display: none; }
.yt-preview img { width: 160px; border-radius: 8px; }
.yt-preview span { color: var(--green); font-weight: 600; }
.admin-quick { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.tabs a { padding: .8rem 1.2rem; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { border-color: var(--accent); color: var(--accent); }
.tabs b { font-size: .75rem; background: var(--surface-2); padding: .1rem .5rem; border-radius: 99px; margin-left: .3rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-2); }
.table .actions { white-space: nowrap; text-align: right; }
.table .thumb { width: 80px; border-radius: 6px; }

/* ------------------------------------------------------------------ toasts */
.toasts { position: fixed; right: 1rem; top: 90px; z-index: 120; display: flex; flex-direction: column; gap: .5rem; }
.toast { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: .92rem; font-weight: 500; animation: slideIn .4s var(--ease); max-width: 380px; }
.toast button { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: var(--muted); margin-left: auto; }
.toast-success i { color: var(--green); }
.toast-error i { color: #D92D20; }
.toast-info i { color: #1C7ED6; }
.toast.out { opacity: 0; transform: translateX(20px); transition: .3s; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--ink); color: rgba(251,247,240,.75); margin-top: 0; }
:root[data-theme="dark"] .site-footer { background: #0B0A16; }
.madhubani-border { height: 22px; background:
  radial-gradient(circle at 11px 11px, #C99200 3px, transparent 3.5px) 0 0/22px 22px,
  linear-gradient(#C2410C 0 0) 0 2px/100% 2px no-repeat,
  linear-gradient(#C2410C 0 0) 0 18px/100% 2px no-repeat;
  background-color: #1B1A3A; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.6fr 1fr; gap: 3rem; padding: 3.5rem 0 2rem; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-cats { grid-template-columns: 1fr 1fr; }
.site-footer a:hover { color: #F7A070; }
.brand-light strong { color: #fff; }
.brand-light em { color: #F7A070; }
.site-footer p { font-size: .92rem; margin-top: 1rem; }
.footer-note { border-top: 1px solid rgba(255,255,255,.1); padding: 1.2rem 0 1.6rem; font-size: .8rem; }
.footer-note p { margin: 0; }

.to-top { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(20px); transition: .3s var(--ease); pointer-events: none; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ------------------------------------------------------------- reveal anim */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .timeline-chart .bar-fill { height: var(--h); }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-slider { min-height: 380px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh; width: min(320px, 85vw); visibility: hidden; flex-direction: column; gap: .2rem; padding: 5rem 1rem 1rem;
    background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .35s var(--ease); z-index: 60; overflow-y: auto;
  }
  .nav-links.open { transform: none; visibility: visible; }
  .nav-actions { margin-left: auto; position: relative; z-index: 61; }
  .mega { position: static; width: auto; translate: none; grid-template-columns: 1fr; box-shadow: none; border: 0; padding: 0 0 0 .5rem; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-mega.open .mega { display: grid; }
  .topbar .hindi { display: none; }
  .highlight-grid { grid-template-columns: 1fr 1fr; }
  .highlight:nth-child(2) { border-right: 0; }
  .highlight:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.1); }
  .article-layout { grid-template-columns: 1fr; }
  .article-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .article-side .side-card { flex: 1 1 200px; }
}
@media (max-width: 560px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .topbar-inner > span:first-child { display: none; }
  .topbar-inner { justify-content: flex-end; }
  .prev-next { grid-template-columns: 1fr; }
  .prev-next .right { grid-column: auto; }
  .news-grid, .video-grid { grid-template-columns: 1fr; }
  .hero-search .btn { padding: .7rem 1rem; }
}

/* ------------------------------------------------------------- district map */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.map-section { background: linear-gradient(180deg, var(--paper), var(--surface-2)); }
.district-picker select { min-width: 240px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: stretch; max-width: 1100px; margin-inline: auto; }
.map-wrap { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 1rem 1rem 2.6rem; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bihar-map { display: block; width: 100%; max-width: 520px; height: auto; max-height: min(58vh, 420px); margin: 0 auto; overflow: visible; }
.bihar-map .dist { fill: var(--surface-2); stroke: var(--surface); stroke-width: 1.4; stroke-linejoin: round; transition: fill .25s, opacity .25s, stroke .2s; }
.bihar-map .dist.lv0 { fill: color-mix(in srgb, var(--ink) 6%, var(--surface)); }
.bihar-map .dist.lv1 { fill: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.bihar-map .dist.lv2 { fill: color-mix(in srgb, var(--accent) 42%, var(--surface)); }
.bihar-map .dist.lv3 { fill: color-mix(in srgb, var(--accent) 66%, var(--surface)); }
.bihar-map .dist.lv4 { fill: var(--accent); }
.map-wrap .dist { cursor: pointer; }
.map-wrap .dist:hover, .map-wrap .dist.hover, .map-wrap .dist:focus-visible { stroke: var(--ink); stroke-width: 2.4; outline: none; filter: brightness(1.04); }
.bihar-map.has-selection .dist:not(.selected) { opacity: .55; }
.bihar-map .dist.selected { stroke: var(--ink); stroke-width: 3; opacity: 1; }
.dist-labels text { font: 600 12.5px var(--font-body); fill: var(--ink-2); text-anchor: middle; dominant-baseline: middle; pointer-events: none;
  paint-order: stroke; stroke: color-mix(in srgb, var(--surface) 80%, transparent); stroke-width: 3px; }
.dist-labels text.selected { font-size: 16px; font-weight: 800; fill: var(--ink); }
.map-tip { position: absolute; transform: translate(-50%, -100%); pointer-events: none; background: var(--ink); color: var(--paper); padding: .45rem .75rem; border-radius: 10px; font-size: .85rem; white-space: nowrap; box-shadow: var(--shadow-lg); z-index: 3; }
.map-tip strong { display: block; font-weight: 700; }
.map-tip span { opacity: .8; font-size: .78rem; }
.map-tip::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.map-legend { position: absolute; left: 1.2rem; bottom: 1rem; display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--muted); flex-wrap: wrap; }
.map-legend > span { font-weight: 700; margin-right: .3rem; }
.map-legend i { width: 18px; height: 12px; border-radius: 3px; display: inline-block; }
.map-legend small { margin-right: .4rem; }
.map-legend .lv0 { background: color-mix(in srgb, var(--ink) 6%, var(--surface)); border: 1px solid var(--line); }
.map-legend .lv1 { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.map-legend .lv2 { background: color-mix(in srgb, var(--accent) 42%, var(--surface)); }
.map-legend .lv3 { background: color-mix(in srgb, var(--accent) 66%, var(--surface)); }
.map-legend .lv4 { background: var(--accent); }

.map-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 1.5rem; box-shadow: var(--shadow); min-height: 100%; position: relative; transition: opacity .2s; scroll-margin-top: 90px; }
.map-panel.loading { opacity: .55; }
.panel-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.3rem; margin-bottom: 1rem; }
.map-panel h3 { font-size: 1.45rem; }
.map-panel h3 .hindi { font-size: .7em; color: var(--muted); font-weight: 400; }
.map-panel h4 { font: 700 .75rem var(--font-body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 1.4rem 0 .5rem; }
.top-districts { list-style: none; padding: 0; margin: 0; counter-reset: td; }
.top-districts button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .75rem; border: 0; border-radius: 10px; background: none; font: 500 .95rem var(--font-body); color: var(--ink); cursor: pointer; text-align: left; counter-increment: td; }
.top-districts button::before { content: counter(td); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .75rem; font-weight: 700; flex: none; }
.top-districts button span { flex: 1; }
.top-districts button small { color: var(--muted); margin-left: .3rem; }
.top-districts button b { color: var(--accent); }
.top-districts button:hover { background: var(--surface-2); }
.panel-close { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.panel-close:hover { border-color: var(--accent); color: var(--accent); }
.panel-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
.panel-stats div { background: var(--surface-2); border-radius: 12px; padding: .7rem; text-align: center; }
.panel-stats strong { display: block; font: 800 1.6rem/1 var(--font-display); color: var(--accent); }
.panel-stats span { font-size: .75rem; color: var(--muted); }
.mini-cats { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.mini-cat { font-size: .75rem; font-weight: 600; padding: .3rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); }
.mini-cat b { margin-left: .2rem; }
.mini-cat:hover { background: var(--c); color: #fff; }
.panel-stories { list-style: none; padding: 0 .3rem 0 0; margin: 0 0 1.2rem; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.panel-stories a { display: block; padding: .75rem 0 .75rem .9rem; border-bottom: 1px solid var(--line); border-left: 3px solid var(--c); margin-bottom: .1rem; }
.panel-stories a:hover { background: var(--surface-2); color: var(--ink); }
.panel-stories strong { display: block; font-weight: 600; font-size: .93rem; line-height: 1.35; }
.panel-stories .st-cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c); }
.panel-stories em { font-style: normal; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.panel-stories small { color: var(--muted); font-size: .78rem; }
.panel-empty { text-align: center; padding: 2rem 0 1rem; color: var(--muted); }
.panel-empty i { font-size: 2rem; opacity: .5; }
.btn-block { white-space: normal; text-align: center; }

.district-hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.locator { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: .8rem; box-shadow: var(--shadow); transition: transform .3s var(--ease); }
.locator:hover { transform: translateY(-3px); }
.locator .dist { fill: color-mix(in srgb, var(--ink) 8%, var(--surface)); stroke: var(--surface); stroke-width: 1.2; }
.locator .dist-labels { display: none; }
.district-jump select { min-width: 260px; margin-top: 1rem; border-radius: 999px; }
.small { font-size: .88rem; }
.pill b { font-size: .75rem; opacity: .75; margin-left: .15rem; }
.dist-link { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }

@media (max-width: 1024px) {
  .map-layout { grid-template-columns: 1fr; }
  .dist-labels text { font-size: 15px; }
}
@media (max-width: 640px) {
  .dist-labels { display: none; }
  .map-wrap { padding: .5rem .5rem 2.6rem; border-radius: 18px; }
  .bihar-map { max-height: 46vh; }
  .district-picker, .district-picker select { width: 100%; }
  .district-hero-grid { grid-template-columns: 1fr; }
  .locator { max-width: 360px; }
}

/* ---- map click effects ---- */
.map-wrap .dist { transform-box: fill-box; transform-origin: center; }
.map-wrap .dist:active { transform: scale(.97); }
.bihar-map .dist.pop { animation: distPop .55s var(--ease); }
@keyframes distPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); filter: drop-shadow(0 6px 10px rgba(27,26,58,.35)); }
  100% { transform: scale(1); }
}
.bihar-map .ripple { fill: none; stroke: var(--accent); stroke-width: 3; pointer-events: none; animation: ripple .9s ease-out forwards; }
.bihar-map .ripple.r2 { animation-delay: .15s; opacity: 0; }
@keyframes ripple { 0% { r: 4; opacity: .9; stroke-width: 4; } 100% { r: 70; opacity: 0; stroke-width: 1; } }
.bihar-map .pin { pointer-events: none; animation: pinDrop .5s cubic-bezier(.3,1.6,.5,1) both; }
.bihar-map .pin path { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.bihar-map .pin circle { fill: var(--surface); }
@keyframes pinDrop { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.map-panel .panel-body { animation: panelIn .4s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateX(14px); } }
.map-panel.flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent), var(--shadow); transition: box-shadow .2s; }
.panel-stats strong { animation: countIn .5s var(--ease); }
@keyframes countIn { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .bihar-map .dist.pop, .bihar-map .ripple, .bihar-map .pin, .map-panel .panel-body { animation: none !important; }
}

/* ======================================================================
   Saffron district map (v3)
   ====================================================================== */
:root {
  --saffron: #FF9933; --saffron-deep: #E67300; --chakra-blue: #1E40AF;
  --map-0: #FFF4E6; --map-1: #FFDDB3; --map-2: #FFC27A; --map-3: #FF9933; --map-4: #E67300;
  --map-ink: #3B1F00;
}
.map-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); max-width: 1240px; align-items: start; }
.map-wrap { padding: 1.4rem 1rem 2.8rem; background:
  radial-gradient(circle at 50% 40%, #FFFBF5 0%, #FFF6EA 70%); border-color: #F6D9B5; }
:root[data-theme="dark"] .map-wrap { background: radial-gradient(circle at 50% 40%, #2A2238 0%, #1B1A2F 75%); border-color: #3A2F45; }
.map-wrap::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--saffron) 0 33.3%, #fff 33.3% 66.6%, var(--chakra-blue) 66.6%); }
.bihar-map { max-width: 640px; max-height: min(64vh, 470px); filter: drop-shadow(0 10px 18px rgba(230, 115, 0, .18)); }
.bihar-map .dist { stroke: #FFFFFF; stroke-width: 1.6; }
.bihar-map .dist.lv0 { fill: var(--map-0); }
.bihar-map .dist.lv1 { fill: var(--map-1); }
.bihar-map .dist.lv2 { fill: var(--map-2); }
.bihar-map .dist.lv3 { fill: var(--map-3); }
.bihar-map .dist.lv4 { fill: var(--map-4); }
.map-wrap .dist:hover, .map-wrap .dist.hover, .map-wrap .dist:focus-visible { fill: #FFB25C; stroke: var(--map-ink); stroke-width: 2.2; filter: none; }
.bihar-map.has-selection .dist:not(.selected) { opacity: .9; }
.bihar-map .dist.selected, .map-wrap .dist.selected:hover { fill: var(--chakra-blue); stroke: #FFFFFF; stroke-width: 3; opacity: 1;
  filter: drop-shadow(0 4px 8px rgba(30, 64, 175, .45)); }
.bihar-map .dist.selected.pop { animation: distPop .6s var(--ease), selGlow 1.2s ease-out; }
@keyframes selGlow { 0% { fill: #FFD27F; } 40% { fill: var(--chakra-blue); } }

.dist-labels text { font-family: var(--font-body); font-weight: 700; fill: var(--map-ink); text-anchor: middle; dominant-baseline: middle; pointer-events: none;
  paint-order: stroke; stroke: rgba(255, 248, 238, .85); stroke-width: 3.5px; stroke-linejoin: round; transition: fill .3s; }
.map-wrap .dist-labels text { opacity: 1; }
.dist-labels text.selected { fill: #FFFFFF; stroke: rgba(15, 30, 90, .7); font-weight: 800; }
.map-legend .lv0 { background: var(--map-0); border: 1px solid #F1D3AE; }
.map-legend .lv1 { background: var(--map-1); }
.map-legend .lv2 { background: var(--map-2); }
.map-legend .lv3 { background: var(--map-3); }
.map-legend .lv4 { background: var(--map-4); }
.map-legend .sel { background: var(--chakra-blue); margin-left: .6rem; }
.bihar-map .ripple { stroke: var(--chakra-blue); }
.bihar-map .pin path { fill: #B91C1C; stroke: #FFFFFF; }
.compass { position: absolute; top: 1.3rem; right: 1.1rem; width: 44px; height: 44px; opacity: .8; pointer-events: none; }
.compass text { font: 700 11px var(--font-body); fill: var(--map-ink); }
:root[data-theme="dark"] .compass text { fill: #F4EFE6; }

/* panel: same height as the map, stories scroll inside */
.map-panel { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.map-panel > .panel-intro, .map-panel > .panel-body { padding: 1.5rem; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.map-panel .panel-head { background: linear-gradient(135deg, var(--chakra-blue), #172E7A); color: #fff; margin: -1.5rem -1.5rem 1rem; padding: 1.3rem 1.5rem 1.1rem; position: relative; overflow: hidden; }
.map-panel .panel-head::after { content: ""; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%;
  border: 14px double rgba(255,255,255,.18); }
.map-panel .panel-head .eyebrow { color: #C7D7FF; margin: 0 0 .2rem; }
.map-panel .panel-head h3 { color: #fff; margin: 0; }
.map-panel .panel-head h3 .hindi { color: rgba(255,255,255,.75); }
.map-panel .panel-close { top: .9rem; right: .9rem; background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.35); color: #fff; z-index: 1; }
.map-panel .panel-close:hover { background: #fff; color: var(--chakra-blue); }
.panel-stats strong { color: var(--chakra-blue); }
.panel-stories { flex: 1; min-height: 0; max-height: none; overflow-y: auto; margin: 0 -.5rem 1rem 0; padding-right: .5rem; scroll-behavior: smooth; }
.panel-stories li { animation: storyIn .45s var(--ease) both; }
.panel-stories li:nth-child(2) { animation-delay: .05s; } .panel-stories li:nth-child(3) { animation-delay: .1s; }
.panel-stories li:nth-child(4) { animation-delay: .15s; } .panel-stories li:nth-child(5) { animation-delay: .2s; }
.panel-stories li:nth-child(n+6) { animation-delay: .25s; }
@keyframes storyIn { from { opacity: 0; transform: translateY(8px); } }
.panel-stories a { border-radius: 0 10px 10px 0; padding-right: .6rem; }
.panel-stories p { margin: .25rem 0 .2rem; font-size: .84rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.panel-stories::-webkit-scrollbar { width: 6px; }
.panel-stories::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--chakra-blue) 40%, transparent); border-radius: 9px; }
.panel-scroll-hint { font-size: .75rem; color: var(--muted); margin: -.4rem 0 .6rem; }
.panel-intro .top-districts { overflow-y: auto; min-height: 0; }
.map-panel .btn-primary { background: var(--chakra-blue); box-shadow: 0 6px 18px -8px var(--chakra-blue); flex: none; }
.map-panel.flash { box-shadow: 0 0 0 3px rgba(30, 64, 175, .45), var(--shadow); }
@media (max-width: 1024px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-panel { height: auto !important; max-height: 640px; }
}
@media (max-width: 640px) {
  .dist-labels { display: block; }
  .bihar-map { max-height: 52vh; }
  .compass { width: 34px; height: 34px; }
}

/* ======================================================================
   Visual elements: skyline illustration + Madhubani dividers
   ====================================================================== */
:root { --sk-ink: #3B2A4F; --sk-far: #E9D7C2; --sk-ground: #F3C98E; --sk-river-top: #9FD0E6; --sk-river-bot: #5FA9CF;
        --sk-brick: #C8693B; --sk-tree: #2F7D32; --sk-light: #F7E6D2; }
:root[data-theme="dark"] { --sk-ink: #2E2A4A; --sk-far: #232039; --sk-ground: #3A2E2A; --sk-river-top: #24476A; --sk-river-bot: #173352;
        --sk-brick: #8E4A2A; --sk-tree: #1E5A22; --sk-light: #3B3556; }
.skyline { display: block; width: 100%; height: clamp(110px, 15vw, 210px); }
.skyline .sk-ink, .skyline .sk-ink path, .skyline .sk-ink rect, .skyline .sk-ink circle { fill: var(--sk-ink); }
.skyline .sk-stroke { stroke: var(--sk-ink); fill: none !important; }
.skyline .sk-light-stroke { stroke: var(--sk-light); fill: none !important; }
.skyline .sk-door { fill: var(--sk-light) !important; opacity: .55; }
.skyline .sk-far rect { fill: var(--sk-far); }
.skyline .sk-temple-lines line { stroke: var(--sk-light); stroke-width: 1.6; opacity: .6; }
.skyline .sk-tree circle { fill: var(--sk-tree); }
.skyline .sk-trunk { fill: #5B3A1E; }
.skyline .sk-brick rect { fill: var(--sk-brick); }
.skyline .sk-niche { fill: var(--sk-ink); opacity: .55; }
.skyline .sk-car { fill: #FF9933; }
.skyline .sk-window { fill: #FFF6E5; }
.skyline .sk-stripe { fill: #1E40AF; }
.skyline .sk-solar path { fill: #2D4A8A; stroke: #9DB7F0; stroke-width: 1; }
.skyline .sk-solar rect { fill: var(--sk-ink); }
.skyline .sk-ground { fill: var(--sk-ground); }
.skyline .sk-waves path { stroke: rgba(255,255,255,.65); }
.skyline .sk-boat path { fill: var(--sk-ink); }
.skyline .sk-boat .sk-sail { fill: #FFF1DE; }
.skyline .sk-birds path { stroke: var(--sk-ink); opacity: .7; }
.skyline .sk-rays rect { fill: #FFB347; opacity: .55; }
.sk-rays { animation: skSpin 60s linear infinite; transform-origin: 0 0; }
@keyframes skSpin { to { transform: rotate(360deg); } }
.sk-train { animation: skTrain 16s linear infinite; }
@keyframes skTrain { from { transform: translateX(1450px); } to { transform: translateX(770px); } }

.sk-birds { animation: skBirds 22s ease-in-out infinite alternate; }
@keyframes skBirds { from { transform: translate(0, 0); } to { transform: translate(140px, -12px); } }
.sk-boat { animation: skBoat 26s ease-in-out infinite alternate; }
@keyframes skBoat { from { transform: translateX(-40px); } to { transform: translateX(120px); } }
.sk-waves { animation: skWave 4s ease-in-out infinite alternate; }
@keyframes skWave { to { transform: translateX(18px); } }
.sk-sun { animation: skRise 2.4s var(--ease) both; }
@keyframes skRise { from { transform: translate(1185px, 170px); opacity: 0; } to { transform: translate(1185px, 92px); opacity: 1; } }

.hero { padding-bottom: 0; }
.hero-skyline { position: relative; margin-top: clamp(1.5rem, 3vw, 2.5rem); pointer-events: none; }
.highlights { margin-top: 0; padding-top: 0; position: relative; z-index: 1; }
.footer-skyline { margin-bottom: -2px; background: var(--paper); }
.footer-skyline .skyline { height: clamp(80px, 10vw, 140px); }
.district-hero { padding-bottom: 0; }
.district-hero .skyline { margin-top: 2rem; height: clamp(80px, 10vw, 130px); }

.motif-divider { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1.2rem 16px; max-width: 900px; margin: 0 auto; }
.motif-divider .md-line { flex: 1; height: 10px; background:
  radial-gradient(circle, var(--saffron, #FF9933) 2px, transparent 2.5px) 0 50% / 14px 10px repeat-x; opacity: .7; }
.motif-divider svg { flex: none; max-width: 60vw; height: auto; }
.md-fish path { stroke: var(--accent); }
.md-fish .md-eye { fill: var(--accent); stroke: none; }
.md-lotus path { fill: #FF9933; }
.md-lotus .md-petal2 { fill: #1E40AF; opacity: .85; }
.md-lotus circle { fill: #C99200; }
.motif-divider.reveal.in svg { animation: mdIn .8s var(--ease); }
@keyframes mdIn { from { transform: scale(.7); opacity: 0; } }

/* richer card art: soft watermark pattern of the category icon */
.card-art::before { background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.22) 0 18px, transparent 19px),
  radial-gradient(circle at 85% 75%, rgba(255,255,255,.14) 0 34px, transparent 35px); }

@media (prefers-reduced-motion: reduce) {
  .sk-rays, .sk-train, .sk-birds, .sk-boat, .sk-waves, .sk-sun { animation: none !important; }
  .sk-train { transform: translateX(1150px); }
}

/* compact panel header so the story list gets the space */
.map-panel .panel-head { padding: 1rem 1.5rem .9rem; margin-bottom: .8rem; }
.map-panel .panel-head h3 { font-size: 1.35rem; }
.map-panel .panel-stats { display: flex; gap: .4rem; margin: 0 0 .7rem; }
.map-panel .panel-stats div { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: .35rem; padding: .45rem .5rem; border-radius: 10px; }
.map-panel .panel-stats strong { font-size: 1.15rem; display: inline; }
.map-panel .panel-stats span { font-size: .72rem; }
.map-panel .mini-cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; margin-bottom: .5rem; scrollbar-width: none; flex: none; }
.map-panel .mini-cats::-webkit-scrollbar { display: none; }
.map-panel .mini-cat { flex: none; }
.map-panel .panel-scroll-hint { margin: 0 0 .4rem; flex: none; }
.map-panel .panel-stories { border-top: 1px solid var(--line); }
.map-panel .panel-stories a { padding-top: .65rem; padding-bottom: .65rem; }
.map-panel .btn-block { padding: .7rem 1rem; }

.sk-footer .sk-sun, .sk-footer .sk-birds { display: none; }

/* v4: selection is a calm colour change only — no scaling, ripple or pin */
.map-wrap .dist { transition: fill .35s ease, stroke .2s ease; }
.map-wrap .dist:active { transform: none; }
.bihar-map .dist.selected, .bihar-map .dist.selected.pop, .map-wrap .dist.selected:hover { animation: none; filter: none; transform: none; }
.bihar-map.has-selection .dist:not(.selected) { opacity: 1; }
.map-panel.flash { box-shadow: var(--shadow); }

.error-detail { text-align: left; background: var(--surface-2); border-left: 4px solid #D92D20; padding: .8rem 1rem; border-radius: 0 10px 10px 0; font-size: .85rem; word-break: break-word; }

/* ======================================================================
   Story images (uploaded photo, or the sector illustration underneath)
   ====================================================================== */
.card-media .card-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform .6s var(--ease); }
.card:hover .card-media .card-photo { transform: scale(1.06); }
.card-media .chip { z-index: 2; }
.slide-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.slide-art:has(.slide-photo) > i { display: none; }
.slide-art:has(.slide-photo)::before { z-index: 1; background: linear-gradient(180deg, rgba(11,10,22,.05), rgba(11,10,22,.35)); }

.article-figure { position: relative; margin: 0 0 1.8rem; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 8; box-shadow: var(--shadow); }
.article-figure .article-art { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: .6rem; color: #fff; }
.article-figure .article-art i { font-size: 4.2rem; }
.article-figure .article-art span { position: relative; z-index: 1; font: 700 .85rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.article-figure .article-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; z-index: 2; }
.article-figure figcaption { position: absolute; z-index: 3; right: .7rem; bottom: .7rem; background: rgba(11,10,22,.65); color: #fff; font-size: .75rem; padding: .3rem .65rem; border-radius: 99px; backdrop-filter: blur(4px); }

/* admin form */
.img-field { border: 1.5px dashed var(--line); border-radius: 16px; padding: 1rem 1.1rem 1.2rem; margin: 0; }
.img-field legend { font-weight: 700; font-size: .9rem; padding: 0 .4rem; }
.img-field legend small { font-weight: 400; color: var(--muted); }
.img-grid { display: grid; grid-template-columns: 240px 1fr; gap: 1.2rem; align-items: start; }
.img-preview { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.img-preview .card-art i { font-size: 2.6rem; }
.img-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.img-preview img[hidden] { display: none; }
.img-badge { position: absolute; left: .5rem; bottom: .5rem; z-index: 2; background: rgba(11,10,22,.7); color: #fff; font-size: .72rem; font-weight: 600; padding: .25rem .6rem; border-radius: 99px; max-width: calc(100% - 1rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-controls { display: flex; flex-direction: column; gap: .9rem; }
.form .drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; text-align: center; padding: 1.1rem; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); cursor: pointer; font-weight: 500; transition: .2s; }
.form .drop i { font-size: 1.6rem; color: var(--accent); }
.form .drop small { font-weight: 400; color: var(--muted); }
.form .drop:hover, .form .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.form .drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.thumb-cell { width: 92px; }
.thumb-art { display: grid; place-items: center; width: 80px; height: 45px; border-radius: 6px; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #1B1A3A)); }
.table .thumb { width: 80px; height: 45px; object-fit: cover; }

/* map panel story thumbnails */
.panel-stories a { display: grid; grid-template-columns: 58px 1fr; column-gap: .75rem; align-items: start; }
.panel-stories .st-thumb { grid-row: span 4; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; position: relative; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #1B1A3A)); }
.panel-stories .st-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel-stories a > :not(.st-thumb) { grid-column: 2; }
@media (max-width: 640px) { .img-grid { grid-template-columns: 1fr; } }

/* map sits first on the home page, right under the headline ticker */
.map-section.map-top { padding-top: clamp(1.8rem, 4vw, 2.8rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.map-section.map-top .section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

/* Admin → Google News */
.gn-admin .form-card h3 { margin-top: 0; }
.gn-fetch { display: flex; gap: 1.5rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.gn-fetch > div { flex: 1 1 420px; }
.gn-log { white-space: pre-wrap; font-size: .82rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; margin: .6rem 0 0; overflow-x: auto; }
.gn-table select { max-width: 190px; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; font-size: .85rem; }
.gn-table td .small { margin-top: .25rem; }
.gn-add { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.gn-add input { flex: 1 1 260px; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; }
.gn-add select { padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; }
.gn-intro { max-width: 860px; margin-top: .6rem; }
.gn-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.gn-row label { flex: 1 1 220px; max-width: 300px; }
.gn-sources { min-width: 220px; }
.gn-count { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; background: #FDE8E8; color: #B42318; margin: 0 .3rem .3rem 0; }
.gn-count.ok { background: #E6F4EA; color: #1E7B34; }
.gn-src { display: inline-block; font-size: .78rem; padding: .1rem .5rem; border-radius: 99px; background: var(--surface-2); margin: 0 .25rem .25rem 0; color: inherit; text-decoration: none; }
.gn-src.off { background: #E6F4EA; color: #1E7B34; font-weight: 600; }
.gn-table select + select { margin-top: .3rem; }
