/*
Theme Name: Doinik Bangladesh
Theme URI: https://dailybangladesh.live
Author: Doinik Bangladesh
Description: News aggregator theme with bias visualization, blindspot detection, ownership transparency, SolaimanLipi Bangla typography, and built-in mega menu. Mirrors the React app at dailybangladesh.live.
Version: 1.3.0
License: GNU General Public License v2 or later
Text Domain: doinik-bangladesh
Tags: news, bangla, dark-mode, three-columns, bias-aware, mega-menu, solaimanlipi
*/

/* ──────────────────────────────────────────────────────────────
   FONTS — SolaimanLipi (primary Bangla) + Source Sans 3 (Latin)
   SolaimanLipi served from jsDelivr CDN (Maateen Bangla fonts).
   ────────────────────────────────────────────────────────────── */
@font-face {
  font-family: "SolaimanLipi";
  src: url("https://cdn.jsdelivr.net/gh/maateen/bangla-web-fonts/fonts/SolaimanLipi/SolaimanLipi.woff2") format("woff2"),
       url("https://cdn.jsdelivr.net/gh/maateen/bangla-web-fonts/fonts/SolaimanLipi/SolaimanLipi.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0980-09FF, U+200C-200D, U+25CC, U+0964-0965;
}
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&display=swap");

/* ──────────────────────────────────────────────────────────────
   UNIFIED TEAL/EMBER PALETTE — ported from src/index.css
   ────────────────────────────────────────────────────────────── */
:root {
  --background: 150 25% 5%;
  --foreground: 152 18% 95%;
  --card: 158 24% 8%;
  --card-foreground: 152 18% 95%;
  --primary: 8 78% 56%;
  --primary-foreground: 0 0% 100%;
  --secondary: 160 38% 13%;
  --muted: 158 22% 12%;
  --muted-foreground: 152 14% 64%;
  --accent: 162 60% 26%;
  --accent-foreground: 152 25% 96%;
  --border: 160 30% 15%;
  --radius: 0.75rem;

  --bias-al: 200 70% 52%;
  --bias-left: 195 75% 62%;
  --bias-center: 152 10% 60%;
  --bias-bnp: 8 78% 56%;
  --bias-islamist: 162 60% 26%;

  --shadow-md: 0 8px 24px 0 hsl(0 0% 0% / 0.25);
  --shadow-lg: 0 20px 50px -10px hsl(0 0% 0% / 0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "SolaimanLipi", "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: hsl(var(--primary)); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ──────────────────────────────────────────────────────────────
   LAYOUT — 3-column grid like React app
   ────────────────────────────────────────────────────────────── */
.db-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.db-grid {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 1.5rem;
  padding: 1.5rem 0;
}

@media (max-width: 1024px) {
  .db-grid { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────────
   HEADER
   ────────────────────────────────────────────────────────────── */
.db-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(var(--background) / 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid hsl(var(--border));
}

.db-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

.db-logo {
  font-family: "SolaimanLipi", serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.db-logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: hsl(var(--primary));
  box-shadow: 0 0 12px hsl(var(--primary) / 0.6);
}

.db-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.db-nav a {
  color: hsl(var(--muted-foreground));
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  text-decoration: none;
}
.db-nav a:hover, .db-nav a.active {
  color: hsl(var(--foreground));
  border-bottom-color: hsl(var(--primary));
}

/* Live ticker */
.db-ticker {
  background: hsl(var(--accent) / 0.18);
  border-bottom: 1px solid hsl(var(--border));
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.85rem;
}
.db-ticker-track {
  display: inline-block;
  padding: 0.5rem 0;
  animation: db-ticker-scroll 40s linear infinite;
}
.db-ticker-item { padding: 0 1.5rem; color: hsl(var(--foreground) / 0.85); }
.db-ticker-item::before {
  content: "●"; color: hsl(var(--primary)); margin-right: .4rem; font-size: .6rem; vertical-align: middle;
}
@keyframes db-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ──────────────────────────────────────────────────────────────
   STORY CARD
   ────────────────────────────────────────────────────────────── */
.db-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.db-card:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--accent));
  box-shadow: var(--shadow-md);
}
.db-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: hsl(var(--muted));
}
.db-card-body { padding: 1rem 1.1rem 1.25rem; }
.db-card-category {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: hsl(var(--primary));
  margin-bottom: .4rem;
}
.db-card-title {
  font-family: "SolaimanLipi", serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 .55rem;
  line-height: 1.35;
  color: hsl(var(--foreground));
}
.db-card-title a { color: inherit; text-decoration: none; }
.db-card-title a:hover { color: hsl(var(--primary)); }
.db-card-summary {
  font-size: .9rem;
  color: hsl(var(--muted-foreground));
  margin: 0 0 .8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.db-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: hsl(var(--muted-foreground));
  border-top: 1px solid hsl(var(--border));
  padding-top: .65rem;
}

/* ──────────────────────────────────────────────────────────────
   BIAS DISTRIBUTION BAR
   ────────────────────────────────────────────────────────────── */
.db-bias-bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: hsl(var(--muted));
  margin: .5rem 0;
}
.db-bias-bar > span { display: block; height: 100%; transition: width .4s ease; }
.db-bias-al        { background: hsl(var(--bias-al)); }
.db-bias-left      { background: hsl(var(--bias-left)); }
.db-bias-center    { background: hsl(var(--bias-center)); }
.db-bias-bnp       { background: hsl(var(--bias-bnp)); }
.db-bias-islamist  { background: hsl(var(--bias-islamist)); }

.db-bias-legend {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  font-size: .68rem;
  color: hsl(var(--muted-foreground));
  margin-top: .25rem;
}
.db-bias-legend > span { display: inline-flex; align-items: center; gap: .25rem; }
.db-bias-legend i {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}

/* ──────────────────────────────────────────────────────────────
   BLINDSPOT BADGE
   ────────────────────────────────────────────────────────────── */
.db-blindspot {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  background: hsl(38 85% 52% / 0.18);
  color: hsl(38 85% 70%);
  border: 1px solid hsl(38 85% 52% / 0.35);
}

/* ──────────────────────────────────────────────────────────────
   SIDEBAR
   ────────────────────────────────────────────────────────────── */
.db-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.db-side-block {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.db-side-title {
  font-family: "SolaimanLipi", serif;
  font-size: .95rem;
  font-weight: 700;
  margin: 0 0 .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid hsl(var(--primary) / 0.5);
  display: inline-block;
}
.db-side-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .65rem; }
.db-side-list a {
  color: hsl(var(--foreground) / 0.9);
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.4;
}
.db-side-list a:hover { color: hsl(var(--primary)); }

/* ──────────────────────────────────────────────────────────────
   SINGLE STORY — ported from StoryDetail.tsx
   ────────────────────────────────────────────────────────────── */
.db-story-hero {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.db-story-hero img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }
.db-story-hero-body { padding: 1.5rem; }
.db-story-title {
  font-family: "SolaimanLipi", serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .75rem;
}
@media (max-width: 768px) {
  .db-story-title { font-size: 1.5rem; }
}

.db-narratives {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 768px) { .db-narratives { grid-template-columns: 1fr; } }
.db-narrative {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-left: 4px solid;
  padding: 1.1rem;
  border-radius: var(--radius);
}
.db-narrative.left { border-left-color: hsl(var(--bias-left)); }
.db-narrative.right { border-left-color: hsl(var(--bias-bnp)); }
.db-narrative h4 {
  margin: 0 0 .5rem;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: hsl(var(--muted-foreground));
}
.db-narrative p { margin: 0; font-size: .95rem; line-height: 1.6; }

/* Source list */
.db-sources { display: flex; flex-direction: column; gap: .8rem; }
.db-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}
.db-source-name { font-weight: 600; font-size: .95rem; }
.db-source-bias {
  font-size: .7rem;
  text-transform: uppercase;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

/* ──────────────────────────────────────────────────────────────
   FOOTER
   ────────────────────────────────────────────────────────────── */
.db-footer {
  background: hsl(var(--card));
  border-top: 1px solid hsl(var(--border));
  padding: 2.5rem 1rem 1.5rem;
  margin-top: 3rem;
  color: hsl(var(--muted-foreground));
  font-size: .85rem;
}
.db-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.db-footer h5 { color: hsl(var(--foreground)); margin: 0 0 .75rem; font-size: .9rem; }
.db-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.db-footer-bottom {
  border-top: 1px solid hsl(var(--border));
  padding-top: 1rem;
  margin-top: 1.5rem;
  text-align: center;
  font-size: .75rem;
}

/* ──────────────────────────────────────────────────────────────
   STORY DETAIL — single.php
   ────────────────────────────────────────────────────────────── */
.db-story-detail { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1rem; }
.db-story-hero { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
.db-story-hero-body { display: flex; flex-direction: column; gap: .75rem; }
.db-story-thumb img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid hsl(var(--border)); aspect-ratio: 16 / 9; object-fit: cover; }
.db-story-meta-top { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.db-meta-pill { background: hsl(var(--primary) / 0.12); color: hsl(var(--primary)); padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.db-fact-badge { padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.db-story-title { font-size: clamp(1.5rem, 4.5vw, 2.5rem); line-height: 1.2; margin: .25rem 0; font-weight: 700; }
.db-story-byline { color: hsl(var(--muted-foreground)); font-size: .85rem; display: flex; gap: .5rem; }
.db-share button { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); color: hsl(var(--foreground)); padding: .4rem .85rem; border-radius: .4rem; font-size: .85rem; cursor: pointer; }
.db-share button:hover { background: hsl(var(--secondary)); }

.db-story-grid { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
@media (max-width: 1024px) { .db-story-grid { grid-template-columns: 1fr; } }
.db-story-side { display: flex; flex-direction: column; gap: 1rem; }

.db-bias-card { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.db-bias-card h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.db-bias-card-sub { color: hsl(var(--muted-foreground)); font-size: .85rem; margin: 0 0 .75rem; }
.db-bias-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: .75rem; }
.db-bias-stat { text-align: center; }
.db-bias-stat strong { display: block; font-size: 1.1rem; }
.db-bias-stat span { font-size: .7rem; color: hsl(var(--muted-foreground)); }
@media (max-width: 600px) { .db-bias-grid { grid-template-columns: repeat(3, 1fr); } }

.db-story-summary { background: hsl(var(--secondary) / 0.4); border-left: 3px solid hsl(var(--primary)); padding: 1rem 1.25rem; border-radius: 0 .5rem .5rem 0; margin-bottom: 1.25rem; }
.db-story-summary h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .5rem; color: hsl(var(--primary)); }
.db-story-summary p { margin: 0; }

.db-story-body { margin-bottom: 1.5rem; }
.db-story-body h2 { font-size: 1.1rem; margin: 0 0 .75rem; display: flex; align-items: center; gap: .5rem; }
.db-source-attr { font-size: .82rem; color: hsl(var(--muted-foreground)); margin: 0 0 .75rem; }
.db-story-content { font-size: 1rem; line-height: 1.85; }
.db-story-content p { margin: 0 0 1rem; }
.db-source-deeplink { margin-top: 1rem; }
.db-source-deeplink a { color: hsl(var(--primary)); font-weight: 600; }

.db-source-compare h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.db-source-tabs { display: flex; gap: .5rem; flex-wrap: wrap; border-bottom: 1px solid hsl(var(--border)); padding-bottom: .5rem; margin-bottom: 1rem; }
.db-source-tabs button { background: transparent; border: 1px solid hsl(var(--border)); color: hsl(var(--foreground)); padding: .35rem .75rem; border-radius: .35rem; cursor: pointer; font-size: .8rem; }
.db-source-tabs button.active { background: hsl(var(--primary)); color: #fff; border-color: hsl(var(--primary)); }
.db-source-list { display: flex; flex-direction: column; gap: .75rem; }
.db-source-row { display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: .85rem; background: hsl(var(--card)); border: 1px solid hsl(var(--border) / 0.6); border-left-width: 4px; border-radius: .5rem; text-decoration: none; color: inherit; }
.db-source-row:hover { border-color: hsl(var(--primary) / 0.6); }
.db-source-row img { width: 96px; height: 64px; object-fit: cover; border-radius: .35rem; }
.db-source-row-meta { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-bottom: .25rem; font-size: .75rem; }
.db-bias-pill { padding: .1rem .45rem; border-radius: 999px; font-size: .65rem; font-weight: 600; }
.db-source-row h3 { font-size: .9rem; margin: 0 0 .25rem; line-height: 1.35; }
.db-source-row p { font-size: .78rem; color: hsl(var(--muted-foreground)); margin: 0; line-height: 1.4; }

/* ──────────────────────────────────────────────────────────────
   ELECTION + BLINDSPOT widgets
   ────────────────────────────────────────────────────────────── */
.doinik-widget-root { padding: 1rem 0; }
.doinik-leaderboard { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.doinik-bar-row { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); padding: .75rem 1rem; border-radius: .5rem; }
.doinik-bar { background: hsl(var(--secondary)); border-radius: 999px; height: 8px; overflow: hidden; }
.doinik-bar span { display: block; height: 100%; background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent))); border-radius: 999px; transition: width .3s ease; }

/* ──────────────────────────────────────────────────────────────
   PAGINATION
   ────────────────────────────────────────────────────────────── */
.nav-links { display: flex; gap: .35rem; }
.nav-links a, .nav-links span { padding: .4rem .75rem; border-radius: .35rem; border: 1px solid hsl(var(--border)); color: hsl(var(--foreground)); text-decoration: none; font-size: .85rem; }
.nav-links .current { background: hsl(var(--primary)); color: #fff; border-color: hsl(var(--primary)); }

/* ──────────────────────────────────────────────────────────────
   MEGA MENU — built-in, no plugin required
   Hover (desktop) / tap (mobile) opens a full-width panel with
   columns of category links + featured story.
   ────────────────────────────────────────────────────────────── */
.db-megamenu {
  position: relative;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.db-mm-item {
  position: relative;
}

.db-mm-trigger {
  background: none;
  border: 0;
  color: hsl(var(--muted-foreground));
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.55rem 0.85rem;
  border-radius: 0.4rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color .15s, background .15s;
}
.db-mm-trigger:hover,
.db-mm-trigger[aria-expanded="true"],
.db-mm-trigger.active {
  color: hsl(var(--foreground));
  background: hsl(var(--secondary) / 0.5);
}
.db-mm-trigger .db-mm-caret {
  font-size: 0.65rem;
  transition: transform .2s;
  opacity: .7;
}
.db-mm-item:hover .db-mm-caret,
.db-mm-trigger[aria-expanded="true"] .db-mm-caret {
  transform: rotate(180deg);
}

.db-mm-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 720px;
  max-width: 92vw;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.2fr;
  gap: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  z-index: 60;
}
.db-mm-item:hover > .db-mm-panel,
.db-mm-item:focus-within > .db-mm-panel,
.db-mm-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.db-mm-col h6 {
  margin: 0 0 .65rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: hsl(var(--primary));
  padding-bottom: .4rem;
  border-bottom: 1px solid hsl(var(--border));
}
.db-mm-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.db-mm-col a {
  color: hsl(var(--foreground) / 0.85);
  font-size: .88rem;
  font-weight: 500;
  display: block;
  padding: .25rem 0;
  border-radius: .25rem;
  transition: color .15s, padding .15s;
}
.db-mm-col a:hover {
  color: hsl(var(--primary));
  padding-left: .35rem;
  text-decoration: none;
}

.db-mm-feature {
  background: hsl(var(--secondary) / 0.4);
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 0.25rem);
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.db-mm-feature img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: .4rem;
  background: hsl(var(--muted));
}
.db-mm-feature span.tag {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: hsl(var(--primary));
}
.db-mm-feature h4 {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
  color: hsl(var(--foreground));
}
.db-mm-feature a { color: inherit; }

/* Mobile: stacked accordion */
.db-mm-toggle {
  display: none;
  background: none;
  border: 0;
  color: hsl(var(--foreground));
  font-size: 1.5rem;
  cursor: pointer;
  padding: .35rem .5rem;
}

@media (max-width: 1024px) {
  .db-mm-toggle { display: inline-flex; }
  .db-megamenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: hsl(var(--background));
    border-top: 1px solid hsl(var(--border));
    padding: .75rem 1rem 1.25rem;
    gap: 0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .db-megamenu.is-open { display: flex; }
  .db-mm-item { width: 100%; border-bottom: 1px solid hsl(var(--border) / 0.6); }
  .db-mm-trigger { width: 100%; justify-content: space-between; padding: .85rem .25rem; }
  .db-mm-panel {
    position: static;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: 1fr;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 1rem .5rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .db-mm-panel.is-open { display: grid; }
  .db-mm-feature { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   STORY DETAIL v2 — magazine-style redesign
   ══════════════════════════════════════════════════════════════ */

/* Reading progress bar */
.db-reading-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
  z-index: 100;
  transition: width .1s linear;
  box-shadow: 0 0 12px hsl(var(--primary) / 0.6);
}

.db-story-v2 { max-width: 1320px; margin: 0 auto; padding: 0 1rem 3rem; }

/* ─── HERO ─── */
.db-hero-v2 {
  position: relative;
  min-height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0 2rem;
  background: hsl(var(--card));
  background-image: var(--hero-img, none);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  border: 1px solid hsl(var(--border));
}
@media (max-width: 768px) {
  .db-hero-v2 { min-height: 360px; }
}

.db-hero-v2-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    hsl(var(--background) / 0.97) 0%,
    hsl(var(--background) / 0.85) 30%,
    hsl(var(--background) / 0.45) 60%,
    transparent 100%
  );
}

.db-hero-v2-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  max-width: 900px;
}
@media (max-width: 640px) {
  .db-hero-v2-content { padding: 1.75rem 1.25rem 1.25rem; }
}

.db-hero-v2-pills {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.db-hero-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  backdrop-filter: blur(8px);
  border: 1px solid hsl(var(--border));
  text-decoration: none;
}
.db-hero-pill--cat       { background: hsl(var(--primary) / 0.2); color: hsl(var(--primary)); border-color: hsl(var(--primary) / 0.4); }
.db-hero-pill--blindspot { background: hsl(38 85% 52% / 0.18); color: hsl(38 85% 70%); border-color: hsl(38 85% 52% / 0.4); }
.db-hero-pill--fact      { background: hsl(var(--accent) / 0.3); color: hsl(var(--accent-foreground)); }
.db-hero-pill--sources   { background: hsl(var(--card) / 0.7); color: hsl(var(--foreground)); }

.db-hero-v2-title {
  font-family: "SolaimanLipi", serif;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .85rem;
  color: hsl(var(--foreground));
  text-shadow: 0 2px 12px hsl(var(--background) / 0.6);
}
.db-hero-v2-deck {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: hsl(var(--foreground) / 0.9);
  margin: 0 0 1.1rem;
  max-width: 720px;
}
.db-hero-v2-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .5rem;
  font-size: .85rem;
  color: hsl(var(--muted-foreground));
}
.db-hero-v2-meta .db-dot { opacity: .5; }
.db-hero-share {
  background: hsl(var(--card) / 0.8);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  padding: .35rem .85rem;
  border-radius: 999px;
  font-size: .8rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.db-hero-share:hover { background: hsl(var(--secondary)); border-color: hsl(var(--primary)); }

/* ─── GRID ─── */
.db-story-v2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2.5rem;
}
@media (max-width: 1024px) {
  .db-story-v2-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

.db-story-v2-main { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }

/* ─── BIAS DASHBOARD ─── */
.db-bias-dashboard {
  background: linear-gradient(135deg, hsl(var(--card)), hsl(var(--secondary) / 0.4));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
}
.db-bias-dashboard-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 1rem;
}
.db-bias-dashboard-head h2 { margin: 0; font-size: 1.15rem; }
.db-bias-dashboard-head span { font-size: .8rem; color: hsl(var(--muted-foreground)); }

.db-bias-dashboard .db-bias-bar {
  height: 12px;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 1px 3px hsl(0 0% 0% / 0.3);
}

.db-bias-dashboard .db-bias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .75rem;
  margin: 0;
}
.db-bias-stat {
  background: hsl(var(--background) / 0.6);
  border: 1px solid hsl(var(--border));
  border-radius: .5rem;
  padding: .65rem .75rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.db-bias-stat-bar {
  height: 4px;
  background: hsl(var(--muted));
  border-radius: 999px;
  margin-bottom: .5rem;
  overflow: hidden;
}
.db-bias-stat-bar i {
  display: block;
  height: 100%;
  width: var(--bar-fill, 0%);
  border-radius: 999px;
  transition: width .6s ease;
}
.db-bias-stat strong { display: block; font-size: 1.1rem; color: hsl(var(--foreground)); font-weight: 700; }
.db-bias-stat span { font-size: .7rem; color: hsl(var(--muted-foreground)); }

/* ─── TL;DR ─── */
.db-tldr {
  background: hsl(var(--secondary) / 0.45);
  border-left: 4px solid hsl(var(--primary));
  border-radius: 0 .5rem .5rem 0;
  padding: 1.1rem 1.4rem;
}
.db-tldr-label {
  display: inline-block;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: hsl(var(--primary));
  margin-bottom: .5rem;
}
.db-tldr p {
  margin: 0;
  font-size: 1.02rem; line-height: 1.65;
  color: hsl(var(--foreground) / 0.95);
}

/* ─── DUAL NARRATIVES ─── */
.db-narratives-v2 h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.db-narratives-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
@media (max-width: 700px) { .db-narratives-grid { grid-template-columns: 1fr; } }
.db-narrative-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  position: relative;
  overflow: hidden;
}
.db-narrative-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.db-narrative-card--left::before  { background: hsl(var(--bias-left)); }
.db-narrative-card--right::before { background: hsl(var(--bias-bnp)); }
.db-narrative-card header {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: hsl(var(--muted-foreground));
  margin-bottom: .5rem;
  display: flex; align-items: center; gap: .4rem;
}
.db-narrative-card p { margin: 0; font-size: .95rem; line-height: 1.65; }

.db-bias-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}

/* ─── FULL BODY ─── */
.db-fullbody {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.75rem;
}
.db-fullbody-head { margin-bottom: 1.25rem; }
.db-fullbody-head h2 { margin: 0 0 .35rem; font-size: 1.2rem; }
.db-source-attr {
  font-size: .85rem; color: hsl(var(--muted-foreground));
  margin: 0;
}
.db-source-owner { opacity: .85; }

.db-fullbody-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: hsl(var(--foreground) / 0.95);
  border-left: 3px solid var(--accent, hsl(var(--primary)));
  padding-left: 1.2rem;
}
.db-fullbody-content p { margin: 0 0 1.1rem; }
.db-fullbody-content h2,
.db-fullbody-content h3 {
  margin: 1.5rem 0 .75rem;
  font-family: "SolaimanLipi", serif;
}
.db-fullbody-content blockquote {
  border-left: 4px solid hsl(var(--primary));
  background: hsl(var(--secondary) / 0.3);
  padding: .85rem 1.1rem;
  margin: 1rem 0;
  border-radius: 0 .4rem .4rem 0;
  font-style: italic;
}
.db-fullbody-content img { border-radius: .5rem; margin: 1rem 0; }

.db-source-deeplink-v2 {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: 1.25rem;
  padding: .55rem 1.1rem;
  border: 2px solid;
  border-radius: 999px;
  font-weight: 600; font-size: .9rem;
  text-decoration: none;
  transition: background .15s;
}
.db-source-deeplink-v2:hover { background: hsl(var(--secondary) / 0.5); text-decoration: none; }

/* ─── SOURCE LADDER ─── */
.db-source-ladder { }
.db-ladder-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: .85rem;
}
.db-ladder-head h2 { margin: 0; font-size: 1.2rem; }
.db-ladder-head span { font-size: .85rem; color: hsl(var(--muted-foreground)); }

.db-ladder-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap;
  border-bottom: 1px solid hsl(var(--border));
  padding-bottom: .65rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}
.db-ladder-tabs button {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  padding: .4rem .85rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: .82rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: .35rem;
  white-space: nowrap;
  transition: all .15s;
}
.db-ladder-tabs button:hover { border-color: hsl(var(--primary) / 0.5); }
.db-ladder-tabs button.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.db-ladder-list { display: flex; flex-direction: column; gap: .85rem; }
.db-ladder-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  padding: 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border) / 0.6);
  border-left: 4px solid var(--card-accent, hsl(var(--primary)));
  border-radius: .55rem;
  text-decoration: none;
  color: inherit;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.db-ladder-card:hover {
  transform: translateX(4px);
  border-color: var(--card-accent, hsl(var(--primary)));
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
@media (max-width: 600px) {
  .db-ladder-card { grid-template-columns: 1fr; }
  .db-ladder-thumb img { width: 100%; height: auto; aspect-ratio: 16/9; }
}
.db-ladder-thumb img { width: 160px; height: 90px; object-fit: cover; border-radius: .35rem; display: block; }
.db-ladder-meta {
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
  font-size: .75rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: .35rem;
}
.db-ladder-meta strong { color: var(--card-accent, hsl(var(--primary))); font-weight: 600; }
.db-bias-pill {
  padding: .1rem .5rem;
  border-radius: 999px;
  font-size: .65rem; font-weight: 600;
  background: var(--card-accent, hsl(var(--primary)));
  color: hsl(var(--primary-foreground));
  opacity: .85;
}
.db-ladder-time { margin-left: auto; opacity: .7; }
.db-ladder-card h3 {
  font-family: "SolaimanLipi", serif;
  font-size: 1rem; font-weight: 700;
  margin: 0 0 .35rem;
  line-height: 1.4;
  color: hsl(var(--foreground));
}
.db-ladder-card p {
  font-size: .82rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── STICKY SIDEBAR ─── */
.db-story-v2-side .db-side-sticky {
  position: sticky;
  top: 90px;
  display: flex; flex-direction: column; gap: 1rem;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: .25rem;
}
.db-story-v2-side .db-side-sticky::-webkit-scrollbar { width: 6px; }
.db-story-v2-side .db-side-sticky::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 3px; }

@media (max-width: 1024px) {
  .db-story-v2-side .db-side-sticky { position: static; max-height: none; overflow: visible; }
}

.db-side-block--gauge .db-bias-bar { height: 10px; margin: .5rem 0; }
.db-side-note {
  font-size: .72rem;
  color: hsl(var(--muted-foreground));
  margin: .5rem 0 0;
  text-align: center;
}
