/* ---------- Theme tokens (light default, dark via system or data-theme) ---------- */
:root {
  --bg: #f8f5fc;
  --header-bg: #ffffff;
  --card: #ffffff;
  --band: #efeff1;
  --card-border: rgba(18, 18, 18, 0.10);
  --ink: #121212;
  --text: #1f1f1f;
  --muted: #5d5b62;
  --faint: #85828b;
  --purple: #6b21a8;
  --purple-dark: #581c87;
  --accent: #7e22ce;
  --breaking: #dc2626;
  --skeleton: #e7e5ea;
  --input-bg: #ffffff;
  --input-border: rgba(18, 18, 18, 0.18);
  --stuck-shadow: 0 1px 0 rgba(18, 18, 18, 0.08), 0 6px 16px rgba(18, 18, 18, 0.06);
  --frame: rgba(126, 34, 206, 0.16);
  --pop-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 0 rgba(126, 34, 206, 0.07), 0 12px 28px -14px rgba(76, 29, 149, 0.18);
}
/* Dark theme only on phones; the desktop page always stays white */
@media (prefers-color-scheme: dark) and (max-width: 720px) {
  :root:not([data-theme="light"]) {
    --bg: #100f0f;
    --header-bg: #100f0f;
    --card: #201f1f;
    --band: #1a1919;
    --card-border: rgba(239, 238, 236, 0.12);
    --ink: #f4f3f1;
    --text: #efeeec;
    --muted: #b4b2ae;
    --faint: #9b9a98;
    --purple: #9333ea;
    --purple-dark: #7e22ce;
    --accent: #c084fc;
    --breaking: #ef4444;
    --skeleton: #2b2a2a;
    --input-bg: #181717;
    --input-border: rgba(239, 238, 236, 0.18);
    --stuck-shadow: 0 1px 0 rgba(239, 238, 236, 0.08), 0 6px 16px rgba(0, 0, 0, 0.5);
    --pop-shadow: 0 0 0 1px rgba(192, 132, 252, 0.22), 0 2px 6px rgba(0, 0, 0, 0.5), 0 22px 56px rgba(0, 0, 0, 0.6), 0 0 80px rgba(147, 51, 234, 0.10);
  }
}
:root[data-theme="dark"] {
  --bg: #100f0f;
  --header-bg: #100f0f;
  --card: #201f1f;
  --band: #1a1919;
  --card-border: rgba(239, 238, 236, 0.12);
  --ink: #f4f3f1;
  --text: #efeeec;
  --muted: #b4b2ae;
  --faint: #9b9a98;
  --purple: #9333ea;
  --purple-dark: #7e22ce;
  --accent: #c084fc;
  --breaking: #ef4444;
  --skeleton: #2b2a2a;
  --input-bg: #181717;
  --input-border: rgba(239, 238, 236, 0.18);
  --stuck-shadow: 0 1px 0 rgba(239, 238, 236, 0.08), 0 6px 16px rgba(0, 0, 0, 0.5);
  --pop-shadow: 0 0 0 1px rgba(192, 132, 252, 0.22), 0 2px 6px rgba(0, 0, 0, 0.5), 0 22px 56px rgba(0, 0, 0, 0.6), 0 0 80px rgba(147, 51, 234, 0.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans Devanagari", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1300px; margin: 0 auto; padding: 0 24px; }

/* ---------- Masthead (NYT style) ---------- */
.masthead-area { background: var(--header-bg); padding-bottom: 18px; }
.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding-top: 22px;
}
.side {
  font-size: 15px;
  line-height: 1.75;
  padding-top: 10px;
  color: var(--ink);
}
.side a:hover { color: var(--accent); }
.side.right { text-align: right; }
.side .label { margin-right: 14px; }
.side .time { font-weight: 600; color: var(--accent); }

.masthead {
  display: block;
  text-align: center;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1;
}
.mh-hi { font-family: "Rozha One", serif; font-size: 80px; }
.mh-en {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: 73px;
  letter-spacing: -0.5px;
  margin-left: 12px;
}
.mh-in {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 50px;
  color: var(--accent);
}

/* ---------- Tags row: full-width grey band (Times of India style), sticks to the top on scroll ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--band);
  border-bottom: 3px solid var(--ink);
  transition: box-shadow .2s;
}
.topnav.stuck { box-shadow: var(--stuck-shadow); }
.topnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topnav a {
  display: block;
  padding: 12px 6px 10px;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.topnav a:hover, .topnav a:focus-visible, .topnav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
}
.topnav a.login {
  padding: 6px 20px;
  border: 1px solid var(--purple);
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
}
.topnav a.login:hover, .topnav a.login:focus-visible {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
  color: #fff;
}

/* ---------- Page layout: main column + sticky sidebar ---------- */
.notice {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--faint);
  text-align: center;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 308px;
  grid-template-areas:
    "hero side"
    "feed side";
  column-gap: 24px;
  align-items: start;
  padding: 18px 0 64px;
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

/* ---------- Hero: the "pop-out" top-stories card ---------- */
.hero {
  grid-area: hero;
  padding: 16px;
  box-shadow: var(--pop-shadow);
  animation: pop .45s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero, .slide, .feed-item, .mb-dot { animation: none !important; }
  .mb-run { animation: none !important; }
  .mb-track { overflow-x: auto; }
}

.hero-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}
.thumb {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--skeleton);
  aspect-ratio: 16 / 9;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
a.story:hover .thumb img, .hero-main:hover .thumb img, .feed-item:hover .thumb img { transform: scale(1.04); }

.breaking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--breaking);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.breaking::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .25; } }

.hero-text { display: flex; flex-direction: column; gap: 12px; }
.hero-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.32;
  font-weight: 600;
  color: var(--ink);
}
.hero-title a:hover, .mini:hover .mini-title, .feed-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-sum {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-divider {
  height: 1px;
  background: var(--card-border);
  margin: 20px 0 16px;
}
.hero-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.mini { display: flex; flex-direction: column; gap: 8px; }
.mini-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Feed: "आपके लिए खबरें" (continuous scroll) ---------- */
.feed {
  grid-area: feed;
  margin-top: 28px;
  padding: 0;
  border: 0;
  background: transparent;
}
.feed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}
.feed-head svg { width: 22px; height: 22px; color: var(--accent); }
.feed-list { display: flex; flex-direction: column; gap: 22px; }
.feed-item {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  animation: fadein .4s ease both;
}
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.feed-item + .feed-item {
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 17%, transparent);
}
.feed-item .thumb { aspect-ratio: 260 / 154; }
.feed-body { display: flex; flex-direction: column; gap: 6px; padding-right: 12px; }
.cat {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.feed-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink);
}
.feed-sum {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 0 8px;
  font-size: 14px;
  color: var(--faint);
}
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--card-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sidebar ---------- */
.sidebar {
  grid-area: side;
  position: sticky;
  top: 74px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-card { padding: 18px; }
.trend-title { margin: 0 0 12px; font-size: 17px; font-weight: 700; color: var(--ink); }
.trend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.trend-list li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; }
.trend-num { font-size: 20px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.trend-list a { font-size: 14px; line-height: 1.5; font-weight: 500; color: var(--text); }
.trend-list a:hover { color: var(--accent); }

.social { display: flex; justify-content: center; gap: 22px; padding: 6px 0 0; }
.social a { color: var(--muted); }
.social a:hover { color: var(--accent); }
.social svg { width: 22px; height: 22px; }
.foot-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px;
  font-size: 12px; color: var(--faint);
}
.foot-links a:hover { color: var(--accent); }

/* ---------- Desktop & tablet: framed cards, Yahoo-style story text ---------- */
@media (min-width: 721px) {
  .hero, .feed, .khabar {
    border: 1px solid var(--frame);
    box-shadow: var(--pop-shadow);
  }
  .feed {
    margin-top: 24px;
    padding: 20px;
    background: var(--card);
  }
  /* Headline up to 2 lines, then exactly 2 lines of the story ending in "…" */
  .feed-title, .feed-sum, .hero-sum {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .feed-title { font-size: 22px; }
  .feed-sum { font-size: 16px; }
  .hero-sum { -webkit-line-clamp: 3; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .mh-hi { font-size: 58px; }
  .mh-en { font-size: 53px; }
  .mh-in { font-size: 36px; }
  .topnav a { font-size: 16px; }
  .topnav ul { gap: 10px; overflow-x: auto; scrollbar-width: none; }
  .topnav ul::-webkit-scrollbar { display: none; }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "hero" "side" "feed";
  }
  .sidebar {
    position: static;
    margin-top: 16px;
    display: flex;
  }
  .hero-row { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .mini { scroll-snap-align: start; }
}

/* ---------- Phone-only parts (hidden on bigger screens) ---------- */
.mbar, .mhero, .drawer, .drawer-overlay, .mdate-row, .mbreaking, .mchips { display: none; }

/* ---------- Breaking-news ticker: parts shared by the phone bar (.mbreaking) and the desktop strip (.dbreaking) ---------- */
.mb-label {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 14px;
  background: #7f1d1d;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  font-family: system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.mb-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .7);
  animation: ping 1.4s ease-out infinite;
}
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.mb-track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent);
}
.mb-run {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker var(--ticker-time, 40s) linear infinite;
}
.mbreaking:hover .mb-run, .mbreaking:active .mb-run,
.dbreaking:hover .mb-run, .dbreaking:active .mb-run { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.mb-item { font-size: 15px; font-weight: 600; padding-left: 14px; }
.mb-item::after { content: "•"; padding-left: 14px; opacity: .7; }

/* Desktop strip: red bar right under the grey tags band, text lined up with the page column */
.dbreaking { display: none; }
@media (min-width: 721px) {
  .dbreaking {
    display: block;
    color: #fff;
    background: linear-gradient(90deg, #b91c1c, #dc2626 55%, #e11d48);
  }
  .dbreaking .wrap { display: flex; align-items: stretch; height: 46px; }
  .dbreaking .mb-label { font-size: 14px; padding: 0 22px 0 16px; }
  .dbreaking .mb-item { font-size: 16px; }
  .dbreaking a.mb-item:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  body { background: var(--header-bg); }
  .wrap { padding: 0 16px; }

  /* Desktop-only pieces */
  .masthead-area, .topnav, .hero { display: none; }

  /* Top bar: menu · logo · login (sticky, Yahoo mobile style) */
  .mbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    height: 60px;
    padding: 0 12px;
    background: var(--header-bg);
    box-shadow: var(--stuck-shadow);
  }
  .mbar-btn {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 0; border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }
  .mbar-btn svg { width: 26px; height: 26px; }
  .mbar-logo {
    justify-self: center;
    white-space: nowrap;
    line-height: 1;
    color: var(--ink);
  }
  .mbar-logo .mh-hi { font-size: 28px; }
  .mbar-logo .mh-en { font-size: 26px; margin-left: 6px; letter-spacing: 0; }
  .mbar-logo .mh-in { font-size: 18px; }
  .mbar-login {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--purple);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
  }

  /* Slide-in menu with the tags */
  .drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }
  .drawer-overlay.open { opacity: 1; pointer-events: auto; }
  .drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 50;
    width: min(84vw, 340px);
    padding: 14px 16px 24px;
    overflow-y: auto;
    background: var(--card);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .28s;
  }
  .drawer.open {
    transform: none;
    visibility: visible;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s;
  }
  .drawer-close {
    align-self: flex-end;
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border: 0; border-radius: 50%;
    background: var(--skeleton);
    color: var(--ink);
    cursor: pointer;
  }
  .drawer-close svg { width: 22px; height: 22px; }
  .drawer-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; }
  .drawer-nav a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    color: var(--ink);
  }
  .drawer-nav svg { width: 22px; height: 22px; flex: none; }
  .drawer-nav a.active, .drawer-nav a:hover {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
  }
  .drawer-foot {
    margin-top: auto;
    padding: 20px 14px 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--faint);
  }
  .drawer-foot .time { color: var(--accent); font-weight: 600; }

  /* English date + time row (NYT style) */
  .mdate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    background: color-mix(in srgb, var(--ink) 4%, var(--header-bg));
    border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
  }
  .mdate-row .en-time { font-weight: 600; color: var(--accent); }

  /* Red breaking-news ticker (its parts are shared with the desktop strip, above) */
  .mbreaking {
    display: flex;
    align-items: stretch;
    height: 46px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(90deg, #b91c1c, #dc2626 55%, #e11d48);
  }

  /* Scrolling tag chips */
  .mchips {
    display: flex;
    gap: 8px;
    padding: 12px 16px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .mchips::-webkit-scrollbar { display: none; }
  .mchips a {
    flex: none;
    padding: 6px 16px;
    border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
    border-radius: 999px;
    background: var(--card);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    transition: color .15s, border-color .15s, background .15s;
  }
  .mchips a:hover { color: var(--accent); border-color: var(--accent); }
  .mchips a.active { background: var(--purple); border-color: var(--purple); color: #fff; }

  .notice { margin-top: 10px; font-size: 12px; }
  .layout { padding-top: 12px; }

  /* Top 5 stories: swipeable cards that pop from the page */
  .mhero {
    grid-area: hero;
    display: flex;
    gap: 12px;
    margin: 0 -16px;
    padding: 4px 16px 26px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
  }
  .mhero::-webkit-scrollbar { display: none; }
  .slide {
    position: relative;
    flex: 0 0 88%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 14px;
    background: var(--skeleton);
    color: #fff;
    scroll-snap-align: start;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent), 0 12px 22px -10px rgba(0, 0, 0, 0.55);
    animation: pop .45s cubic-bezier(.2, .8, .2, 1) both;
  }
  .slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.5) 42%, rgba(0, 0, 0, 0) 72%);
  }
  .slide-count {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 1;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    font-size: 13px;
    font-weight: 600;
  }
  .slide-text {
    position: absolute;
    left: 14px; right: 14px; bottom: 14px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .slide-cat { font-size: 13px; font-weight: 600; color: #e9d5ff; }
  .slide-title {
    margin: 0;
    font-size: 19px;
    line-height: 1.45;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sidebar { display: none; }

  /* Feed: photo on the left, no desk / comments line */
  .feed {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .feed-head { font-size: 20px; margin: 0 0 16px; }
  .feed-list { gap: 18px; }
  .feed-item { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .feed-item + .feed-item {
    padding-top: 18px;
    border-top: 1px solid color-mix(in srgb, var(--ink) 17%, transparent);
  }
  .feed-item .thumb { aspect-ratio: 1 / 1; border-radius: 10px; }
  .feed-body { padding-right: 0; gap: 4px; }
  .cat { font-size: 13px; }
  .feed-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
  .feed-flow { font-size: 15px; line-height: 1.55; }
  .feed-title, .feed-sum { display: block; }
  .feed-title { font-size: 17px; line-height: 1.4; }
  .feed-sum {
    margin: 3px 0 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
    -webkit-line-clamp: unset;
    overflow: visible;
  }
}

/* ---------- Whole story row opens the full story ---------- */
.feed-item { position: relative; }
.feed-title a::after { content: ""; position: absolute; inset: 0; }

/* ---------- Full story page (khabar.html) ---------- */
.khabar {
  grid-area: hero;
  padding: 28px 32px 32px;
  animation: pop .45s cubic-bezier(.2, .8, .2, 1) both;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--faint);
}
.crumbs a:hover { color: var(--accent); }
.crumbs .crumb-cat { color: var(--accent); font-weight: 600; }
.story-title {
  margin: 0;
  font-size: 36px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink);
}
.story-date { margin: 12px 0 22px; font-size: 14px; color: var(--faint); }
.story-figure { margin: 0 0 26px; }
.story-figure .thumb { border-radius: 12px; }
.story-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--faint); }
.story-body { max-width: 740px; }
.story-body p { margin: 0 0 20px; font-size: 19px; line-height: 1.85; color: var(--text); }
.story-body p:first-child { font-weight: 500; color: var(--ink); }
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 9px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
.back-home:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.story-missing { padding: 40px 0; text-align: center; }
.story-missing h1 { margin: 0 0 18px; font-size: 26px; color: var(--ink); }

@media (max-width: 720px) {
  .khabar {
    padding: 6px 0 0;
    border: 0;
    background: transparent;
    animation: none;
  }
  .crumbs { margin-bottom: 10px; font-size: 13px; }
  .story-title { font-size: 25px; line-height: 1.4; }
  .story-date { margin: 10px 0 16px; font-size: 13px; }
  .story-figure { margin: 0 -16px 20px; }
  .story-figure .thumb { border-radius: 0; }
  .story-figure figcaption { padding: 0 16px; }
  .story-body p { font-size: 17.5px; line-height: 1.8; margin-bottom: 16px; }
}

/* ---------- Story stream: "अगली खबर" between stories ---------- */
.upnext {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 40px 0 30px;
}
.upnext::before, .upnext::after {
  content: "";
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--ink) 15%, transparent);
}
.upnext-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 6%, var(--card));
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.upnext-label svg { width: 15px; height: 15px; }
.kh-story h2.story-title { font-size: 32px; }
.stream-end { margin-top: 28px; text-align: center; }
.stream-sentinel { height: 1px; }

@media (max-width: 720px) {
  .upnext { margin: 30px 0 22px; }
  .kh-story h2.story-title { font-size: 23px; }
}

/* ---------- Newsroom story blocks: sub-headings, photos and videos inside the story, social posts, quotes ---------- */
.story-body .story-sub { margin: 32px 0 14px; font-size: 25px; line-height: 1.45; font-weight: 700; color: var(--ink); }
.story-body .story-figure { margin: 8px 0 28px; }
.story-photo img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 12px;
  background: var(--skeleton);
}
.story-video video { display: block; width: 100%; max-height: 78vh; border-radius: 12px; background: #000; }
.story-embed { display: block; margin: 8px auto 28px; max-width: 550px; }
.story-embed iframe { display: block; width: 100%; border: 0; }
.embed-yt { max-width: none; }
.embed-yt iframe { aspect-ratio: 16 / 9; border-radius: 12px; background: #000; }
.embed-yt.is-vertical { max-width: 340px; }
.embed-yt.is-vertical iframe { aspect-ratio: 9 / 16; }
.embed-fb { max-width: 500px; }
.embed-fb iframe { height: 640px; }
.embed-fb.is-video iframe { height: auto; aspect-ratio: 16 / 9; }
/* X and Instagram posts: a frame of fixed width; it takes the post's height once the platform reports it
   (NEWSROOM.fitFrames), up to most of the screen, and the post scrolls inside it beyond that */
.embed-frame { max-width: 420px; }
.embed-frame .embed-box {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card);
}
.embed-frame iframe { height: 420px; max-height: min(800px, 86vh); transition: height 0.2s ease; }
.embed-ig iframe { height: 560px; }
.embed-ig.is-reel iframe { height: 720px; }
.embed-open { display: block; margin-top: 8px; font-size: 13.5px; font-weight: 600; text-align: center; color: var(--accent); }
.embed-open:hover { text-decoration: underline; }
/* Before the platform script draws the post */
.story-embed blockquote {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card);
  font-size: 15px;
}
.story-embed blockquote a { color: var(--accent); font-weight: 600; }
/* Threads draws its post in an iframe and keeps the original link box after it */
.story-embed iframe + blockquote.text-post-media-registered { display: none; }
.story-linkcard {
  padding: 14px 16px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card);
}
.story-linkcard:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.story-linkcard .lc-host { display: block; font-size: 13px; font-weight: 600; color: var(--accent); }
.story-linkcard .lc-url { display: block; overflow: hidden; font-size: 15px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.story-quote { margin: 8px 0 28px; padding: 6px 0 6px 22px; border-left: 4px solid var(--accent); }
.story-body .story-quote p { margin: 0; font-size: 22px; line-height: 1.65; font-weight: 600; color: var(--ink); }
.story-quote cite { display: block; margin-top: 8px; font-size: 15px; font-style: normal; color: var(--muted); }
.story-also {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 4px 0 26px;
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
}
.story-also .also-label { flex: none; font-size: 14px; font-weight: 700; color: var(--accent); }
.story-also a { font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.story-also a:hover { color: var(--accent); }

@media (max-width: 720px) {
  .story-body .story-sub { margin-top: 26px; font-size: 21px; }
  .story-body .story-figure { margin: 4px -16px 22px; }
  .story-photo img, .story-video video { border-radius: 0; }
  .story-embed { margin-bottom: 22px; }
  .embed-yt:not(.is-vertical) { margin-left: -16px; margin-right: -16px; }
  .embed-yt:not(.is-vertical) iframe { border-radius: 0; }
  .story-body .story-quote p { font-size: 19px; }
  .story-also { flex-direction: column; gap: 4px; }
  .story-also a { font-size: 16px; }
}

/* ---------- Sidebar note under the footer links (home and story pages) ---------- */
.foot-meta { margin: 0; text-align: center; font-size: 12px; line-height: 1.7; color: var(--faint); }
.foot-meta a:hover { color: var(--accent); }

/* ---------- Phone menu: about and policy links ---------- */
.drawer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 18px;
  padding: 16px 14px 0;
  border-top: 1px solid var(--card-border);
  font-size: 14px;
}
.drawer-links a { padding: 4px 0; color: var(--muted); }
.drawer-links a:hover { color: var(--accent); }

/* ---------- Information and policy pages (about, contact, grievance, policies) ---------- */
.legal-body { max-width: 760px; }
.legal-body p, .legal-body li { font-size: 17px; line-height: 1.85; color: var(--text); }
/* Only the opening paragraph gets the story lead style, not the first line inside boxes */
.story-body.legal-body p:first-child { font-weight: 400; color: var(--text); }
.story-body.legal-body > p:first-child { font-weight: 500; color: var(--ink); }
.legal-body .story-sub { margin: 34px 0 12px; font-size: 23px; scroll-margin-top: 84px; }
.legal-body h3 { margin: 22px 0 8px; font-size: 18px; line-height: 1.5; font-weight: 700; color: var(--ink); }
.legal-body strong { font-weight: 600; color: var(--ink); }
.legal-body ul, .legal-body ol { margin: 0 0 20px; padding-left: 26px; }
.legal-body li { margin-bottom: 8px; }
.legal-body li::marker { color: var(--accent); }
.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.legal-body a:hover { text-decoration-thickness: 2px; }

.toc { margin: 0 0 28px; padding: 14px 18px; border: 1px solid var(--card-border); border-radius: 12px; }
.legal-body .toc-title { margin: 0 0 6px; font-size: 14px; color: var(--faint); }
.legal-body .toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 28px; }
.legal-body .toc li { margin-bottom: 4px; font-size: 15px; line-height: 1.6; break-inside: avoid; }

.info-box {
  margin: 6px 0 24px;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
}
.legal-body .info-box p { margin: 0 0 6px; font-size: 16px; line-height: 1.7; }
.legal-body .info-box p:last-child { margin-bottom: 0; }

.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 4px 0 24px; }
.person {
  padding: 16px 18px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 4%, var(--card));
}
.legal-body .person-name { margin: 0; font-size: 19px; }
.person-name span { display: block; font-size: 14px; font-weight: 500; color: var(--faint); }
.legal-body .person p { margin: 0; font-size: 15px; line-height: 1.65; }
.legal-body .person .person-role { margin: 6px 0 8px; font-size: 14px; font-weight: 600; color: var(--accent); }

.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--card-border); border-radius: 12px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.6; color: var(--text); }
.legal-table th, .legal-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
  vertical-align: top;
}
.legal-table thead th { background: color-mix(in srgb, var(--accent) 7%, var(--card)); font-weight: 700; color: var(--ink); }
.legal-table tbody tr:last-child > * { border-bottom: 0; }
.legal-table .num { width: 1%; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.legal-table .sub { padding-left: 34px; }
.en-label { display: block; font-size: 13px; color: var(--faint); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Sidebar on policy pages: list of pages and the grievance officer */
.policy-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.policy-nav a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 15px; font-weight: 500; color: var(--text); }
.policy-nav a:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.policy-nav a[aria-current="page"] { font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); }
.side-contact p { margin: 0 0 6px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.side-contact strong { color: var(--ink); }
.side-contact a { color: var(--accent); overflow-wrap: anywhere; }
.side-contact a:hover { text-decoration: underline; }

/* ---------- Site footer (pages that end; home and story pages scroll on) ---------- */
.site-foot { padding: 36px 0 28px; border-top: 1px solid var(--card-border); background: var(--header-bg); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 28px; }
.foot-logo { display: inline-block; white-space: nowrap; line-height: 1; color: var(--ink); }
.foot-logo .mh-hi { font-size: 34px; }
.foot-logo .mh-en { font-size: 31px; margin-left: 6px; letter-spacing: 0; }
.foot-logo .mh-in { font-size: 21px; }
.foot-tag { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.foot-col h2 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.foot-col a, .foot-col p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.foot-col p { margin: 0 0 4px; }
.foot-col ul + p, .foot-col p + ul { margin-top: 8px; }
.foot-col a:hover { color: var(--accent); }
.foot-copy {
  margin: 26px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

@media (max-width: 1100px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .legal-body p, .legal-body li { font-size: 16.5px; line-height: 1.8; }
  .legal-body .story-sub { margin-top: 28px; font-size: 20px; }
  .legal-body .toc ol { columns: 1; }
  .legal-table { font-size: 14.5px; }
  .legal-table th, .legal-table td { padding: 10px 12px; }
  .site-foot { padding: 28px 0 22px; background: color-mix(in srgb, var(--ink) 4%, var(--header-bg)); }
  .foot-grid { gap: 22px 16px; }
  .foot-brand, .foot-grievance { grid-column: 1 / -1; }
}

/* ---------- Story page: label, byline, update time, correction note, sharing ---------- */
.story-label {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}
.story-label.is-sponsored { background: #fef3c7; color: #92400e; }
.story-note { margin: -12px 0 20px; font-size: 14px; color: var(--muted); }
.story-by { font-weight: 600; color: var(--ink); }
.story-updated { white-space: nowrap; }
.story-fix {
  max-width: 740px;
  margin: 8px 0 24px;
  padding: 14px 16px;
  border-left: 4px solid #d97706;
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, #d97706 9%, var(--card));
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}
.story-fix strong { color: var(--ink); }

.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 740px;
  margin: 8px 0 4px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.share-label { margin-right: 4px; font-size: 15px; font-weight: 700; color: var(--ink); }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 999px;
  background: var(--card);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.share-btn svg { width: 18px; height: 18px; flex: none; }
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.share-btn.is-wa { border-color: #25d366; background: #25d366; color: #06301a; }
.share-btn.is-wa:hover { background: #1ebe5b; color: #06301a; }
.share-btn.is-done { border-color: #16a34a; color: #16a34a; }
@media (max-width: 720px) {
  .share-label { flex-basis: 100%; }
  /* Icons only for the smaller platforms, so the row fits one line */
  .share-btn.is-fb span, .share-btn.is-x span, .share-btn.is-tg span, .share-btn.is-more span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .share-btn.is-fb, .share-btn.is-x, .share-btn.is-tg, .share-btn.is-more { width: 42px; padding: 0; justify-content: center; }
}
