/* FrontPage News — public site styles. Colours --primary and --accent are set by the admin (Settings). */

:root {
  --primary: #0B2559;
  --accent: #E21B23;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6B7280;
  --line: #E5E7EB;
  --soft: #F4F6FA;
  --paper: #FFFFFF;
  --surface: #FFFFFF;          /* menus, boxes and buttons that sit on the page */
  --ink-body: #1f2937;         /* article text */
  --brand-text: var(--primary);/* headings and links in the brand colour */
  --tone: #000;                /* section colours are mixed toward this for small text */
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --font-head: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --container: 1240px;
  color-scheme: light;
}
/* Dark theme: chosen with the Light / Dark / Automatic switch (stored in the browser). */
html[data-theme="dark"] {
  --ink: #E8ECF4;
  --ink-2: #C3CAD8;
  --ink-body: #D3D9E4;
  --muted: #8F99AC;
  --line: #243049;
  --soft: #141C2C;
  --paper: #0B1120;
  --surface: #111A2B;
  --brand-text: #A9C1FF;
  --tone: #fff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
html[data-theme="dark"] .sc-img img, html[data-theme="dark"] .story-figure img, html[data-theme="dark"] .prose img { filter: brightness(.92); }
html[data-theme="dark"] .mainnav { border-bottom-color: var(--accent); }
/* Dark section colours (e.g. Governance brown) are lifted a little so labels stay readable. */
html[data-theme="dark"] .kicker:not(.is-light), html[data-theme="dark"] .mainnav a.is-active,
html[data-theme="dark"] .story.has-cat .story-title { color: color-mix(in srgb, var(--cat, var(--accent)) 72%, #fff); }
html[data-theme="dark"] .footer { background: #060a14; }
html[data-theme="dark"] .trending-band { background: #0e1a36; }
html[data-theme="dark"] .preview-bar { background: #3b2f0b; color: #fde68a; border-color: #5b4810; }

/* Smooth change of colours when the reader switches theme (only during the switch, not on page load). */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease !important;
}

/* Theme switch */
.theme-switch { position: relative; }
.theme-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .1);
  color: #fff; border: 1px solid rgba(255, 255, 255, .2); cursor: pointer;
}
.theme-btn .ico { width: 16px; height: 16px; }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; display: flex; gap: 4px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
}
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.theme-menu .seg { border: 0; gap: 4px; }
.seg button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 14px; min-width: 78px;
  background: transparent; border: 0; color: var(--ink-2); font-size: 13px; font-weight: 500; border-radius: 9px;
  transition: background .2s, color .2s;
}
.seg button .ico { width: 20px; height: 20px; }
.seg button:hover { background: var(--soft); color: var(--ink); }
.seg button.is-active { background: var(--primary); color: #fff; }
html[data-theme="dark"] .seg button.is-active { background: var(--brand-text); color: #0B1120; }
.drawer-theme { margin-top: 24px; }
.drawer-theme .seg { border-radius: 12px; }
.drawer-theme .seg button { border-radius: 0; }
html[lang="hi"] {
  --font-head: 'Noto Serif Devanagari', 'Source Serif 4', Georgia, serif;
  --font-body: 'Noto Sans Devanagari', 'Inter', system-ui, sans-serif;
}
html[lang="te"] {
  --font-head: 'Noto Serif Telugu', 'Source Serif 4', Georgia, serif;
  --font-body: 'Noto Sans Telugu', 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.no-scroll { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
html[lang="hi"] body, html[lang="te"] body { line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
[x-cloak] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 780px; }
.container.narrow-wide { max-width: 960px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
.ico { width: 20px; height: 20px; flex: none; }
.ico-sm { width: 15px; height: 15px; }
.label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.icon-btn.only-mobile { display: none; }
body { overflow-x: clip; }
.sc-img img, .story-figure img { max-width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.2; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 85%, #000); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--primary); color: var(--brand-text); }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: transparent; color: var(--brand-text);
}
.icon-btn:hover { background: var(--soft); }

/* Top bar */
.topbar { background: var(--primary); color: rgba(255, 255, 255, .85); font-size: 13px; }
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 38px; }
.topbar-motto { letter-spacing: .14em; text-transform: uppercase; font-size: 11px; font-weight: 600; font-style: italic; margin: 0 auto; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-social { display: flex; gap: 10px; }
.topbar-social a { opacity: .8; display: inline-flex; }
.topbar-social a:hover { opacity: 1; }
.topbar-social .ico { width: 16px; height: 16px; }
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .1);
  color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: 4px 10px; font-size: 13px;
}
.lang-btn .ico { width: 16px; height: 16px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); min-width: 180px;
}
.lang-menu a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.lang-menu a small { color: var(--muted); font-size: 12px; }
.lang-menu a:hover, .lang-menu a.is-active { background: var(--soft); }
.lang-menu a.is-active { color: var(--accent); font-weight: 600; }

/* Masthead */
.masthead { background: var(--surface); position: relative; }
.masthead-in { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 14px; }
.masthead-in .logo { grid-column: 1; }
.masthead-tagline { display: none; }
.logo { display: inline-flex; align-items: center; }
.logo-img { max-height: 64px; width: auto; }
.logo-text { display: inline-flex; align-items: center; gap: 2px; font-family: 'Inter', system-ui, sans-serif; font-weight: 800; font-style: italic; letter-spacing: -.02em; line-height: 1; }
.logo-globe { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: 8px; border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 35% 30%, #3b6fd1, var(--primary) 70%); box-shadow: -4px 0 0 -1px var(--accent); }
.logo-globe .ico { width: 28px; height: 28px; stroke-width: 1.6; }
.logo-word { font-size: 34px; color: var(--brand-text); }
.logo-tag { font-size: 30px; color: #fff; background: var(--accent); padding: 5px 12px 6px; margin-left: 6px; transform: skewX(-10deg); border-radius: 3px; }
.logo-text.is-light .logo-word { color: #fff; }

@media (min-width: 900px) {
  .masthead-in { grid-template-columns: 1fr auto 1fr; padding-top: 22px; padding-bottom: 18px; }
  .masthead-in .logo { grid-column: 2; justify-self: center; }
  .masthead-tagline { display: block; grid-column: 1; grid-row: 1; margin: 0; font-family: var(--font-head); font-style: italic; color: var(--muted); font-size: 15px; max-width: 280px; line-height: 1.4; }
  .masthead-in > .icon-btn:last-child { justify-self: end; }
  .logo-word { font-size: 44px; }
  .logo-tag { font-size: 38px; }
  .logo-globe { width: 54px; height: 54px; }
  .logo-globe .ico { width: 34px; height: 34px; }
}

/* Main navigation */
.mainnav {
  border-top: 1px solid var(--line); border-bottom: 3px solid var(--primary); background: color-mix(in srgb, var(--paper) 94%, transparent);
  position: sticky; top: 0; z-index: 30; transition: box-shadow .3s ease; backdrop-filter: saturate(1.4) blur(8px);
}
.is-scrolled .mainnav { box-shadow: 0 6px 20px rgba(11, 37, 89, .12); }
.mainnav-in { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
.mainnav-in::-webkit-scrollbar { display: none; }

/* Each link takes its section colour (--cat; Home uses the accent red). On hover a soft pill pops in
   behind the word and an underline grows from the centre. */
.mainnav a {
  position: relative; isolation: isolate; white-space: nowrap; padding: 15px 16px 14px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em; color: var(--ink-2);
  transition: color .25s ease;
}
.mainnav a::before {
  content: ''; position: absolute; inset: 8px 4px 9px; z-index: -1; border-radius: 999px;
  background: color-mix(in srgb, var(--cat, var(--accent)) 12%, transparent);
  opacity: 0; transform: scale(.7);
  transition: opacity .25s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.mainnav a::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--cat, var(--accent));
  transform: scaleX(0); transform-origin: center;
  transition: transform .35s cubic-bezier(.65, 0, .35, 1);
}
.mainnav a.is-active { color: var(--cat, var(--accent)); }
.mainnav a.is-active::after { transform: scaleX(1); }
.mainnav a.is-active::before { opacity: .7; transform: scale(1); }
.mainnav a:focus-visible { outline: none; color: var(--cat, var(--accent)); }
.mainnav a:focus-visible::before { opacity: 1; transform: scale(1); box-shadow: 0 0 0 2px var(--cat, var(--accent)); }
@media (hover: hover) {
  .mainnav a:hover { color: var(--cat, var(--accent)); }
  .mainnav a:hover::before { opacity: 1; transform: scale(1); }
  .mainnav a:hover::after { transform: scaleX(1); }
  /* The other links fade back a little so the one under the cursor stands out. */
  .mainnav-in:hover a:not(:hover):not(.is-active) { color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) {
  .mainnav a, .mainnav a::before, .mainnav a::after { transition: none; }
}
@media (min-width: 1100px) { .mainnav-in { justify-content: center; } }

/* Breaking ticker */
.ticker { background: var(--soft); border-bottom: 1px solid var(--line); font-size: 14px; }
.ticker-in { display: flex; align-items: center; gap: 14px; height: 42px; overflow: hidden; }
.ticker-label {
  display: inline-flex; align-items: center; gap: 6px; flex: none; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 5px 10px; border-radius: 4px;
}
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-move { display: inline-flex; gap: 48px; white-space: nowrap; animation: ticker 45s linear infinite; }
.ticker-move a { font-weight: 500; position: relative; }
.ticker-move a::after { content: '•'; position: absolute; right: -28px; color: var(--accent); }
.ticker-move a:hover { color: var(--accent); }
.ticker:hover .ticker-move { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-move { animation: none; } }

/* Drawer (mobile menu) */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10, 20, 40, .5); z-index: 60; }
.drawer {
  position: fixed; inset: 0 auto 0 0; width: min(340px, 88vw); background: var(--surface); z-index: 61;
  overflow-y: auto; padding: 16px 20px 32px; box-shadow: 8px 0 32px rgba(0, 0, 0, .2);
}
.drawer-anim { transition: transform .25s ease; }
.drawer-off { transform: translateX(-100%); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer-head .logo-word { font-size: 24px; }
.drawer-head .logo-tag { font-size: 21px; }
.drawer-head .logo-globe { width: 36px; height: 36px; }
.drawer-nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.drawer-nav a { display: flex; align-items: center; gap: 10px; padding: 13px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--accent)); }
.drawer-langs { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-langs .label { width: 100%; }
.drawer-langs a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; }
.drawer-langs a.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Search overlay */
.search-overlay { position: fixed; inset: 0; background: rgba(10, 20, 40, .75); z-index: 70; display: grid; place-items: start center; padding: 12vh 16px 0; }
.search-box {
  width: min(720px, 100%); display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px;
  padding: 10px 10px 10px 20px; box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
}
.search-box > .ico { color: var(--muted); }
.search-box input { flex: 1; border: 0; font-size: 20px; padding: 10px 0; outline: none; font-family: inherit; min-width: 0; }

/* Story cards */
.sc-link { display: block; height: 100%; }
.sc-img { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--soft); aspect-ratio: 16 / 10; }
.sc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.sc-link:hover .sc-img img { transform: scale(1.04); }
.sc-link:hover .sc-title { color: var(--brand-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sc-title { font-family: var(--font-head); font-weight: 700; line-height: 1.25; margin: 6px 0 8px; color: var(--ink); font-size: 19px; }
.dek { color: var(--ink-2); margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.meta span { font-weight: 600; color: var(--ink-2); }
.kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--cat, var(--accent));
}
html[lang="hi"] .kicker, html[lang="te"] .kicker { letter-spacing: 0; font-size: 13px; }
.kicker.is-light { color: #ffb3b6; }
.sc-card .sc-body { padding-top: 12px; }

.sc-row .sc-link { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: start; }
.sc-row .sc-img { aspect-ratio: 4 / 3; border-radius: 8px; }
.sc-row .sc-title { font-size: 16px; margin: 2px 0 6px; }
.search-results .sc-row .sc-link { grid-template-columns: 200px 1fr; }
.search-results .sc-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.search-results .sc-row .sc-title { font-size: 20px; }

.sc-overlay .sc-link { position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; }
.sc-overlay .sc-img { aspect-ratio: auto; height: 100%; min-height: 380px; border-radius: 0; }
.sc-overlay .sc-body {
  position: absolute; inset: auto 0 0 0; padding: 80px 28px 26px;
  background: linear-gradient(180deg, transparent, rgba(5, 15, 35, .55) 30%, rgba(5, 15, 35, .92));
}
.sc-overlay .sc-title { color: #fff; font-size: clamp(24px, 3.2vw, 38px); line-height: 1.15; }
.sc-overlay .sc-link:hover .sc-title { color: #fff; }
.sc-overlay .dek { color: rgba(255, 255, 255, .85); font-size: 16px; max-width: 60ch; }
.sc-overlay .meta, .sc-overlay .meta span { color: rgba(255, 255, 255, .8); }
.sc-overlay .kicker {
  background: var(--accent); color: #fff; padding: 4px 9px; border-radius: 3px; font-size: 11px;
}

/* ── Stylish cards: lift on hover, section pill, NEW badge, language chips ── */
.sc-card .sc-link { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.sc-card .sc-img { transition: box-shadow .35s ease; }
/* A bar in the section colour sweeps in under the photo on hover. */
.sc-card .sc-img::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--cat, var(--accent));
  transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.65, 0, .35, 1);
}
@media (hover: hover) {
  .sc-card .sc-link:hover { transform: translateY(-6px); }
  .sc-card .sc-link:hover .sc-img { box-shadow: 0 18px 36px -12px color-mix(in srgb, var(--cat, var(--primary)) 55%, transparent); }
  .sc-card .sc-link:hover .sc-img::after { transform: scaleX(1); }
}
.sc-pill {
  position: absolute; top: 12px; left: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px;
  background: var(--cat, var(--accent)); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
html[lang="hi"] .sc-pill, html[lang="te"] .sc-pill { letter-spacing: 0; font-size: 12px; }
.badge-new {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px;
  background: #fff; color: var(--accent); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.badge-new i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: new-pulse 1.6s ease-out infinite; }
@keyframes new-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 7px transparent; }
}
.sc-card .badge-new { position: absolute; top: 12px; right: 12px; z-index: 2; }
.sc-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sc-top .badge-new { box-shadow: none; background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 1px 8px 1px 6px; }
.sc-langs-wrap { position: absolute; left: 10px; bottom: 12px; z-index: 2; }
.sc-langs { display: inline-flex; gap: 3px; }
.sc-langs b {
  font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 6px; border-radius: 5px; color: #fff;
  background: rgba(10, 18, 35, .6); backdrop-filter: blur(4px);
}
.sc-langs b.is-current { background: #fff; color: #0B2559; }
.sc-badges { position: absolute; top: 16px; right: 16px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.sc-overlay .sc-img img { transition: transform .5s ease; }
.sc-overlay .sc-link:hover .sc-img img { transform: scale(1.04); }

.sc-overlay[style] .kicker { background: var(--cat); }

/* Magazine grid: the first latest story is twice as big. */
.grid-magazine .is-wide { grid-column: span 2; grid-row: span 2; }
.grid-magazine .is-wide .sc-link, .grid-magazine .is-wide .sc-img { height: 100%; }
.grid-magazine .is-wide .sc-img { min-height: 440px; }
.grid-magazine .is-wide .sc-title { font-size: clamp(22px, 2.4vw, 32px); }
@media (max-width: 1080px) { .grid-magazine .is-wide { grid-row: span 1; } .grid-magazine .is-wide .sc-img { min-height: 360px; } }
@media (max-width: 640px) { .grid-magazine .is-wide { grid-column: span 1; } .grid-magazine .is-wide .sc-img { min-height: 320px; } }
@media (prefers-reduced-motion: reduce) {
  .sc-card .sc-link, .sc-card .sc-img::after, .sc-overlay .sc-img img { transition: none; }
  .badge-new i { animation: none; }
}

/* Homepage */
.hero { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 28px; padding-top: 28px; padding-bottom: 12px; }
.hero-lead .sc-overlay, .hero-lead .sc-link { height: 100%; }
.hero-lead .sc-img { min-height: 480px; }
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-side .sc-row { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.hero-side .sc-row:last-child { border-bottom: 0; padding-bottom: 0; }
.section-label {
  font-family: var(--font-body); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-text); margin: 0; padding-bottom: 10px; border-bottom: 3px solid var(--accent); display: inline-block; align-self: flex-start;
}

.block { padding-top: 40px; padding-bottom: 8px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.block-title {
  margin: 0 0 -1px; font-family: var(--font-head); font-size: 26px; line-height: 1.2; color: var(--brand-text);
  padding-bottom: 10px; border-bottom: 3px solid var(--accent);
}
.block-title.has-cat { border-bottom-color: var(--cat, var(--accent)); }
.block-title a:hover { color: var(--accent); }
.block-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent); padding-bottom: 12px; }
.block-more:hover { text-decoration: underline; }
.block-head.is-light { border-bottom-color: rgba(255, 255, 255, .15); }
.block-head.is-light .block-title { color: #fff; }

.grid { display: grid; gap: 28px 24px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cat-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; }
.cat-layout.is-flipped .cat-lead { order: 2; }
.cat-lead .sc-title { font-size: 26px; }
.cat-list { display: flex; flex-direction: column; gap: 18px; }
.cat-list .sc-row { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cat-list .sc-row:last-child { border-bottom: 0; }
.cat-list .sc-row .sc-link { grid-template-columns: 150px 1fr; }
.cat-list .sc-row .sc-title { font-size: 18px; }

.trending-band { background: var(--primary); color: #fff; margin-top: 48px; padding: 8px 0 40px; position: relative; overflow: hidden; }
.trending-band::before {
  content: ''; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%;
  border: 50px solid rgba(255, 255, 255, .04);
}
.trending-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; counter-reset: t; }
.trending-list li { display: flex; gap: 12px; }
.trending-num { font-family: var(--font-head); font-size: 44px; font-weight: 800; line-height: .9; color: var(--accent); flex: none; }
.trending-title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 17px; line-height: 1.3; margin-top: 4px; }
.trending-list a:hover .trending-title { text-decoration: underline; text-underline-offset: 3px; }

/* Newsletter */
.newsletter { margin-top: 48px; background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--primary) 70%, var(--accent))); color: #fff; }
.newsletter-in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; padding-top: 36px; padding-bottom: 36px; }
.newsletter-text { display: flex; gap: 18px; align-items: flex-start; }
.newsletter-icon { display: inline-grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.newsletter-icon .ico { width: 26px; height: 26px; }
.newsletter h2 { margin: 0 0 4px; font-family: var(--font-head); font-size: 26px; line-height: 1.2; }
.newsletter p { margin: 0; color: rgba(255, 255, 255, .82); }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; position: relative; }
.newsletter-form input[type=email] {
  flex: 1; min-width: 200px; padding: 13px 18px; border-radius: 999px; border: 0; font-size: 15px; font-family: inherit;
}
.newsletter-msg { width: 100%; margin: 4px 0 0; font-weight: 600; }
.newsletter-msg.is-ok { color: #b6f3c8; }
.newsletter-msg.is-err { color: #ffd0d2; }

/* Listing pages */
.list-head { background: var(--soft); border-bottom: 1px solid var(--line); padding: 36px 0 30px; position: relative; }
.list-head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--cat, var(--accent)); }
.list-title { margin: 0; font-family: var(--font-head); font-size: clamp(30px, 4vw, 44px); line-height: 1.15; color: var(--brand-text); }
.list-intro { max-width: 70ch; margin: 10px 0 0; color: var(--ink-2); font-size: 17px; }
.list-lead { margin-bottom: 32px; }
.list-lead .sc-img { min-height: 420px; }
.empty { color: var(--muted); font-size: 17px; padding: 30px 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 40px 0 10px; }
.pager-info { color: var(--muted); font-size: 14px; }
.search-inline { display: flex; align-items: center; gap: 10px; margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px; }
.search-inline > .ico { color: var(--muted); }
.search-inline input { flex: 1; border: 0; outline: none; font-size: 17px; font-family: inherit; min-width: 0; }

/* Avatar */
.avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-lg { width: 84px; height: 84px; margin-bottom: 14px; }
.avatar-initial { display: inline-grid; place-items: center; background: var(--primary); color: #fff; font-weight: 700; font-size: 18px; }

/* Story page */
.story-head { padding-top: 36px; }
.story-title { font-family: var(--font-head); font-size: clamp(30px, 4.4vw, 50px); line-height: 1.12; margin: 10px 0 16px; color: var(--ink); letter-spacing: -.01em; }
html[lang="hi"] .story-title, html[lang="te"] .story-title { line-height: 1.35; letter-spacing: 0; }
.story-dek { font-size: 20px; line-height: 1.5; color: var(--ink-2); margin: 0 0 22px; font-family: var(--font-head); font-weight: 400; }
.story-byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline-who { display: flex; align-items: center; gap: 12px; }
.byline-name { font-weight: 700; color: var(--brand-text); }
.byline-name:hover { text-decoration: underline; }
.byline-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.byline-meta span { display: inline-flex; align-items: center; gap: 4px; }
.share { display: flex; align-items: center; gap: 6px; position: relative; }
.share-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.share a, .share button {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--brand-text); transition: background .15s, color .15s;
}
.share a:hover, .share button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.share .ico { width: 17px; height: 17px; }
.share-toast { position: absolute; right: 0; top: calc(100% + 8px); background: var(--ink); color: #fff; font-size: 13px; padding: 6px 12px; border-radius: 6px; white-space: nowrap; }
.story-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 14px; background: var(--soft); border-radius: var(--radius); font-size: 14px; color: var(--ink-2); }
.story-langs a { font-weight: 600; color: var(--brand-text); background: var(--surface); border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; }
.story-langs a:hover { border-color: var(--accent); color: var(--accent); }
.story-figure { margin-top: 26px; margin-bottom: 0; }
.story-figure img { width: 100%; border-radius: var(--radius); max-height: 620px; object-fit: cover; }
.story-figure figcaption { font-size: 14px; color: var(--muted); padding: 10px 2px 0; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.story-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; max-width: 1100px; padding-top: 30px; }
.story-aside { position: relative; }
.aside-box { position: sticky; top: 72px; padding: 20px; background: var(--soft); border-radius: var(--radius); }
.mini-rank { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.mini-rank li { display: grid; grid-template-columns: 26px 1fr; gap: 6px; }
.mini-rank span { font-family: var(--font-head); font-weight: 800; color: var(--accent); font-size: 20px; line-height: 1.1; }
.mini-rank a { font-weight: 600; font-size: 15px; line-height: 1.35; }
.mini-rank a:hover { color: var(--brand-text); text-decoration: underline; }
.story-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.story-tags .label { margin: 0 6px 0 0; }
.story-tags a { font-size: 14px; padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-family: var(--font-body); }
.story-tags a:hover { background: var(--primary); color: #fff; }

/* Section colours on headlines.
   Headline colours are darkened a little for small text so light colours (saffron, sky blue) stay readable. */
.story.has-cat .story-title { color: var(--cat); }
.story.has-cat .prose h2, .story.has-cat .prose h3 { color: color-mix(in srgb, var(--cat) 80%, var(--tone)); }
.story.has-cat .prose blockquote { border-left-color: var(--cat); color: color-mix(in srgb, var(--cat) 75%, var(--tone)); }
.story.has-cat .prose a { text-decoration-color: var(--cat); }
.list-head .list-title { color: var(--cat, var(--primary)); }
.is-cat-page .sc-title { color: color-mix(in srgb, var(--cat) 82%, var(--tone)); }
.is-cat-page .sc-overlay .sc-title { color: #fff; }
.sc[style] .sc-link:hover .sc-title { color: color-mix(in srgb, var(--cat) 82%, var(--tone)); text-decoration-color: var(--cat); }
.sc-overlay[style] .sc-link:hover .sc-title { color: #fff; }

/* Article text */
.prose { font-family: var(--font-head); font-size: 20px; line-height: 1.75; color: var(--ink-body); }
html[lang="hi"] .prose, html[lang="te"] .prose { font-family: var(--font-body); font-size: 19px; line-height: 1.9; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.25; margin: 1.6em 0 .6em; }
.prose h2 { font-size: 1.45em; }
.prose h3 { font-size: 1.2em; }
.prose a { color: var(--brand-text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--accent);
  font-size: 1.2em; font-style: italic; color: var(--brand-text);
}
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.25em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: 14px; color: var(--muted); font-family: var(--font-body); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose .embed-video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); margin: 1.4em 0; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }
.static-page { padding-top: 40px; padding-bottom: 20px; }
.static-page .prose { font-size: 18px; }

.preview-bar { background: #fef3c7; color: #78350f; text-align: center; padding: 10px 16px; font-size: 14px; border-bottom: 1px solid #fde68a; }
.preview-bar a { color: var(--brand-text); font-weight: 700; text-decoration: underline; margin-left: 8px; }

/* Messages, 404 */
.page-msg { text-align: center; padding: 70px 20px 40px; }
.page-msg h1 { font-family: var(--font-head); font-size: 34px; margin: 0 0 10px; color: var(--brand-text); }
.page-msg p { color: var(--ink-2); }
.big-404 { font-family: var(--font-head); font-size: 110px; font-weight: 800; line-height: 1; margin: 0; color: var(--accent); }

/* Footer */
.footer { background: #081b42; background: color-mix(in srgb, var(--primary) 82%, #000); color: rgba(255, 255, 255, .78); margin-top: 56px; font-size: 15px; }
.newsletter + .footer { margin-top: 0; }
/* Full-width bands sit flush against each other and against the footer. */
.newsletter + .trending-band, .trending-band + .newsletter { margin-top: 0; }
main:has(> .trending-band:last-child) + .footer, main:has(> .newsletter:last-child) + .footer { margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 48px; padding-bottom: 36px; }
.footer .label { color: rgba(255, 255, 255, .5); margin-top: 6px; }
.footer-brand p { max-width: 46ch; }
.footer-brand .logo-word { font-size: 28px; }
.footer-brand .logo-tag { font-size: 24px; }
.footer-brand .logo-globe { width: 40px; height: 40px; }
.footer-list { list-style: none; margin: 0 0 22px; padding: 0; columns: 2; column-gap: 20px; }
.footer-list li { margin-bottom: 8px; break-inside: avoid; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-langs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.footer-langs a { display: inline-block; border: 1px solid rgba(255, 255, 255, .25); padding: 4px 12px; border-radius: 999px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.footer-social a:hover { background: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 0; font-size: 13px; color: rgba(255, 255, 255, .55); }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.visitor-count strong { color: rgba(255, 255, 255, .85); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Responsive */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trending-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .aside-box { position: static; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-lead .sc-img { min-height: 340px; }
  .cat-layout { grid-template-columns: minmax(0, 1fr); }
  .cat-layout.is-flipped .cat-lead { order: 0; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newsletter-in { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .topbar-motto { display: none; }
  .topbar-right { margin-left: auto; }
}
@media (max-width: 640px) {
  .icon-btn.only-mobile { display: inline-grid; }
  .masthead-in { grid-template-columns: auto 1fr auto; gap: 6px; padding-top: 12px; padding-bottom: 10px; }
  .masthead-in .logo { grid-column: 2; justify-self: center; }
  .logo-word { font-size: 24px; }
  .logo-tag { font-size: 20px; padding: 4px 8px; }
  .logo-globe { width: 34px; height: 34px; margin-right: 6px; }
  .logo-globe .ico { width: 22px; height: 22px; }
  .logo-img { max-height: 44px; }
  .topbar-date, .topbar-social { display: none; }
  .grid-4, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .trending-list { grid-template-columns: minmax(0, 1fr); }
  .sc-overlay .sc-body { padding: 60px 18px 18px; }
  .hero { padding-top: 16px; }
  .hero-lead .sc-img { min-height: 300px; }
  .cat-list .sc-row .sc-link, .search-results .sc-row .sc-link { grid-template-columns: 112px 1fr; }
  .block-title { font-size: 22px; }
  .prose { font-size: 18px; }
  .story-dek { font-size: 18px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .search-box input { font-size: 17px; }
}

@media print {
  .topbar, .mainnav, .ticker, .share, .story-aside, .newsletter, .footer, .related, .icon-btn { display: none !important; }
  .story-layout { display: block; }
}
