/*
Theme Name: BD Times News
Theme URI: https://bdtimesnews.com/
Author: BD Times News
Author URI: https://bdtimesnews.com/
Description: Custom theme for BD Times News — a clean, minimal English-first business news portal mixing TBS-style category pages with the bdnews24-style homepage (hero lead + secondary stories, numbered Most Read, Long Read). Brand colours are taken from the site logo: navy #262a68 and red #ec2028. Fonts: Playfair Display headlines, Roboto body, SolaimanLipi for Bangla.
Version: 1.0.7
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bdtimesnews
Tags: news, newspaper, blog, two-columns, right-sidebar, custom-menu, featured-images, translation-ready

Changelog:
= 1.0.7 =
* FIX: primary menu labels now follow the toggle — live (v1.0.6,
  Env 1 AND Env 2, Google NOT blocked) the menu labels NEVER
  translated even after 45s, while the section headings did, so the
  nav_menu_item_title filter was not being applied to the live menu
  output (most plausibly a custom walker injected by the active
  SmartMag Core plugin). A new wp_nav_menu_objects filter rewrites
  each item title before ANY walker renders it, covering the menu
  and sub-menus; the old filter is kept as belt-and-braces. The
  active-menu filter keeps working (URL checks first, both "Latest"
  and "সর্বশেষ" listed, object_id fallback).
* FIX: homepage section headings + excerpts in the Bangla state —
  a full grep of the theme proves there is NO translate="no" /
  notranslate on any section h3/excerpt markup and NO theme JS
  re-injects English heading text after Google Translate runs, so
  the live v1.0.6 untranslated headings are GT's progressive
  translation still catching up within the 45s window (banner at
  ~25s). As a defence, every <main> now carries translate="yes",
  overriding any inherited translate="no" (e.g. from a plugin or
  snippet). The upload task must wait 60s+ before judging.
* FIX: the theme's own Bengali chrome labels no longer get mangled
  by Google Translate — live (v1.0.6, Env 2) GT re-processed the
  theme's correct Bengali into wrong Bengali ("শেষ সংবাদ" for
  Latest News, "নিয়মতান্ত্রিক পঠিত" for Most Read, "এটি" for
  Spotlight, "এবং" for By The Numbers, "যুগ" for the Economy
  region label). EVERY theme-rendered Bengali chrome label now
  carries translate="no" + class="notranslate": nav, tagline,
  ticker label, all .sec-head divs, LM/mini/rail/sidebar headings,
  kicker, All News, missed tags, By The Numbers title, breadcrumb
  links, kicker/chips, Share/Tags labels, Back to Home, toast,
  category crumb/title/chips/Show More/No-stories. Post content
  (headlines, excerpts, body, the breadcrumb post title) is NOT
  marked — Google must translate it. The footer is untouched.
* FIX: the "ENGLISH EDITION / DHAKA · BANGLADESH" header sub-line
  now follows the toggle via the label map ("ইংরেজি সংস্করণ" /
  "ঢাকা · বাংলাদেশ") and is marked notranslate.
* FIX: "TRADE & EXPORT" heading — the label map now decodes HTML
  entities and normalises "&" vs "and" before lookup, so "Trade
  &amp; Export" and "Trade and Export" both map like "Trade &
  Export". Same hardening in bdt_english_label().
= 1.0.6 =
* FIX: বাংলা/ENGLISH toggle switch-back — clicking ENGLISH now
  DELETES the googtrans cookie for every scope (host-only, bare
  hostname, every domain suffix with and without the leading dot,
  both expires-in-the-past and max-age=0) and reloads, instead of
  setting googtrans=/en/en. Live (v1.0.5, Env 2 — Google NOT blocked
  there) the /en/en set could not overwrite the domain-scoped /en/bn
  cookie Google's element had stored, so the server and the element
  both kept seeing /bn: the button stayed "ENGLISH", the date stayed
  Bengali, and the page re-translated itself to Bangla after ~15-25s.
  With no cookie at all the reloaded page stays English, the button
  renders বাংলা and the date renders in English. The ENGLISH action
  no longer waits for the Translate Element (deleting a cookie needs
  no translator) and also drops any language key in web storage. The
  toggle now binds by delegation on document, so it survives the
  button node ever being replaced. The বাংলা direction is unchanged
  (set /en/bn, reload; the element reads it on load).
* FIX: chrome labels follow the toggle — Google Translate leaves the
  theme's own chrome untranslated in the Bangla state (live: menu
  labels and section-heading labels stayed English). The theme now
  renders its own labels server-side from bdt_is_bangla() via the new
  bdt_chrome_label() map: primary nav + sub-menus (nav_menu_item_title
  filter), the 10 section titles, category chips, breadcrumbs,
  kickers, ICYMI tags, and the block headings (Latest News, Most
  Read, By The Numbers, Spotlight, Opinion & Analysis, The Long
  Read, In Case You Missed It, Related Reading, Breaking, All News,
  More, Show More, Back to Home). Body text, headlines and excerpts
  are untouched — Google translates those. The footer is untouched:
  its links already translate via Google live.
* IMPROVEMENT: preconnect to translate.google.com and
  translate.googleapis.com, shaving connection setup off the ~15s
  first Bangla render.
* FIX: language-button font was backwards vs the preview — the
  Roboto 13px rule keyed off lang="en", but lang tracks the PAGE
  language, so the button showing বাংলা got Roboto and the button
  showing ENGLISH got SolaimanLipi. The preview's .langbtn.en (Roboto
  13px) applies when the button shows ENGLISH, i.e. the page is
  Bangla, so the rule now keys off lang="bn"; the বাংলা label keeps
  the default SolaimanLipi 16px. (Round 1 re-read, v1.0.6.)
= 1.0.5 =
* FIX: sticky menu — the nav is now a direct child of <body> (as in
  the approved preview), not nested inside <header>: a sticky element
  can only stick within its parent's box, and the ~230px header let
  the nav pin for only ~180px of scrolling. Menu links also get
  tighter padding at <=1240px so all 10 items fit on one row at
  ~1024px instead of wrapping to two rows.
* FIX: R1/R2 rail ads — main.js's hygiene pass removed EVERY
  .ad-slot inside .hero, including the theme's own R1/R2 rail ads
  (T1/B1 survived because they sit outside the hero). The hero-rail
  is now exempt. Ad slots also render through a new safe helper
  (bdt_safe_dynamic_sidebar): a sidebar holding only orphaned or
  failing widgets renders the demo creative instead of an empty slot.
* FIX: sticky bottom ad — same safe helper; the hygiene de-dup pass
  never hides the theme's own #bdt-sticky-ad bar.
* FIX: critical error on article pages — the theme renders NO tabbed
  widget, so the "সর্বশেষ / শীর্ষ সংবাদ" widget + fatal come from a
  widget (or snippet) outside the theme; but a legacy widget callback
  that throws is NOT caught by WordPress and aborts the template (no
  footer, no Related, no ICYMI). All dynamic_sidebar() calls now go
  through bdt_safe_dynamic_sidebar() (buffered + try/catch, failure
  logged, demo fallback rendered), and the article sidebar, Related
  Reading and ICYMI blocks are each wrapped so one failing block can
  never kill the page. The broken widget itself must still be removed
  in wp-admin (it also fatals Appearance > Widgets) — see README.
* FIX: article layout — grid children get min-width:0 and the body
  gets overflow-wrap so a long unbroken string cannot squeeze the
  text column; the grid itself already matched the artifact exactly.
* FIX: বাংলা toggle — the toggle no longer prefers GTranslate's
  doGTranslate() (its translator is uninitialized, so the click was a
  no-op); it always uses the theme's own Translate Element. The
  element callback is idempotent (a second instance could revert a
  translation), main.js re-creates the element if the callback never
  fired, and the hidden container is off-screen instead of
  display:none (the element initialises unreliably in display:none).
* FIX: ICYMI labels — new bdt_post_label(): section label first,
  else the post's own category (English), else the "News" desk, so
  every card shows a label as in the preview.
* FIX: reduced motion — the artifact disables all transitions and
  animations under prefers-reduced-motion and does not auto-rotate
  the ticker; the theme now does the same (CSS rule + ticker guard).
= 1.0.4 =
* REBUILD: homepage now matches the approved preview artifact
  EXACTLY (the artifact is the authority; the old checklist is not):
  full-width hero (lead + 3 secondary + 6 headline thumbs + ALL
  NEWS, rail R1/R2) → T1 below hero → Latest / Most Read / By The
  Numbers 3-column row → Spotlight → News → Opinion & Analysis
  (full width) → Economy → Market → B1 (light grey, after Market)
  → Trade/Energy/Diaspora/Startup 4-column row (these ARE the
  sections; no separate Features row, no standalone Latest section)
  → Corporate (deep navy, full width) → Long Read (ONE large
  feature) → Diplomatics (mist, full width) → In Case You Missed
  It. Sticky navy menu; active item solid red; no dropdown arrows;
  magnifier search left of Latest; mobile hamburger.
* FIX: missing images — bdt_get_display_image() uses the featured
  image if set, else the first <img> in the post's own content (its
  own original image), else a graceful no-image layout; denylist for
  the two posts whose page images are wrong (see functions.php).
  ICYMI and Related now show images + category tag + excerpt.
* FIX: fonts — Playfair 600–900 now enqueued (v1.0.3 loaded only
  700;800;900), Google Fonts preconnect hints added, font lock
  extended to the new artifact class names. Diagnosis: the enqueued
  URL and font-family names were already correct and the v1.0.1–
  v1.0.3 font-lock block was valid — the live sans-serif rendering
  is almost certainly stale cached CSS (page cache / minify / CDN),
  so the upload task MUST purge every cache layer and hard-refresh
  before verifying fonts live.
* FIX: ads are the preview's LIGHT-GREY "DEMO AD" boxes (brand +
  "DEMO AD · size · tier"), not the dark-navy house ads; T1 below
  hero, R1/R2 in the hero rail, B1 light-grey after Market, Sticky
  bottom bar reliably visible to fresh visitors (visible by default
  in the HTML; the 24h closed state only hides it after a close),
  NO R3 on the homepage (the preview's R3 exists ONLY in the
  category-page sidebar). No CPM/rate text anywhere.
* FIX: Latest and Most Read are now DISJOINT sets (hero + Latest
  excluded from Most Read); sections keep their own category's 5
  latest. Long Read is 1 large feature (Analysis, topped up from
  Economy). By The Numbers is figures only — NO comparison chart
  (the preview's chart was an illustrative placeholder).
* FIX: header sub-line "ENGLISH EDITION / DHAKA · BANGLADESH";
  header socials Facebook/YouTube/X/Instagram/WhatsApp (Telegram
  swapped for YouTube); footer SECTIONS links in English; footer
  socials Facebook/X/Instagram/Phone/Telegram (WhatsApp swapped
  for Phone).
* FIX: article page matches the preview's #articleView exactly
  (breadcrumb, kicker + chips, 41px Playfair H1, dek, byline row
  with share buttons incl. copy link + toast, 16/9 hero + caption,
  ~730px body with drop cap, pull quote, Also Read box, ONE
  in-article ad, tags, author box with navy top border, sticky
  sidebar, Related 3-col, ICYMI). Category pages match #catView
  (breadcrumb, "BROWSING:" title, chips, enlarged lead,
  thumbnailed list, Show More, Most Read + R3 rail).
= 1.0.3 =
* FIX: the theme loads the Google Translate Element itself, so the
  বাংলা button works without the GTranslate plugin's front-end
  script; HFCM snippets 35/36 deactivated (they injected the stray
  headline block + ALL NEWS button on article pages); GTranslate
  "Translate from" corrected to English.
= 1.0.2 =
* FIX: language toggle actually switches (DOM-ready, per-feature
  try/catch, prefers GTranslate doGTranslate(), else cookie+reload
  with max-age AND expires; button is a real <button>).
* FIX: category sections show exactly 5 posts — no hero/Latest
  de-duplication (Startup was starved to 4); only the Latest feed
  keeps the exclusion.
* FIX: featured image no longer appears twice on article pages
  (skipped when the body already shows the lead image).
* FIX: sticky ad closes on ONE click and hides every sticky bar.
* FIX: category resolver handles Bengali slugs/names (Economy =
  অর্থনীতি) and NEVER silently falls back to the newest-posts feed —
  an unresolvable section renders nothing, loudly (HTML comment +
  error_log). Sections query only their own category.
* FIX: duplicate tagline under the logo removed (logo already
  carries it); Latest rail numbered 1-5; category heading is
  "BROWSING: ECONOMY"; chips/breadcrumb/kicker/tags show English
  labels; category pagination removed (Show More only, 20 posts
  per page).
* FIX: Related Reading prefers same-category recent English posts
  with thumbnails; article-page Missed It prefers posts with
  thumbnails; author box is a proper box (real avatar, desk name,
  bio). Leads with no featured image span full width (.no-media).
* ADD: JS hygiene pass removes legacy-injected duplicate ads,
  duplicate "More ›" links, duplicate excerpts, duplicate home
  icons and the stray homepage block on article pages (defensive;
  the lasting fix is deactivating the conflicting HFCM snippets,
  see README). Sticky ad can be force-shown with ?bdt_sticky=show.
= 1.0.1 =
* FIX: main-menu sub-menus are now proper hover/focus dropdowns (hidden by
  default, absolute below the parent item) instead of flowing inline and
  stretching the navy bar to ~290px.
* FIX: category sections query only their own category (children excluded,
  topped up from children only if short) and are hard-capped at 5 posts —
  Economy no longer pulls its 6 child categories into the section.
* FIX: language button and header date now share one strict toggle state
  and are marked notranslate, so GTranslate's client-side translation can
  no longer desync them.
*/

/* ============ Variables & base (artifact values) ============ */
:root {
  --navy: #262a68;
  --navy-deep: #1b1e4d;
  --red: #ec2028;
  --red-dark: #c8111a;
  --red-soft: #fdeeee;
  --red-line: #f0c9cb;
  --red-pale: #ff9aa0;
  --mist: #eef0f6;
  --ink: #141414;
  --body: #2b2b2b;
  --muted: #666666;
  --line: #e3e3e3;
  --line-dark: #c9c9c9;
  --ad-bg: #f3f4f6;
  --ad-line: #e3e3e3;
  --ad-text: #5b6472;
  --ad-size: #8a8f98;
  --footer-bg: #0a2242;
  --footer-link: #b9c9de;
  --footer-head: #6ea3dd;
  --footer-copy: #8fa5c4;
  --bg: #ffffff;
  --serif: "Playfair Display", "Noto Serif Bengali", Georgia, serif;
  --sans: "Roboto", "Noto Sans Bengali", "SolaimanLipi", Arial, sans-serif;
  --bangla: "SolaimanLipi", "Noto Sans Bengali", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  background: var(--bg);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.25; margin: 0 0 12px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============ Topbar ============ */
.topbar { border-bottom: 1px solid var(--line); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 12px; }
.topbar .date { font-size: 13.5px; color: #444; white-space: nowrap; }
.socials { display: flex; gap: 8px; align-items: center; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); color: #fff;
}
.socials a:hover { background: var(--red); color: #fff; }
.socials a svg { width: 16px; height: 16px; fill: #fff; }

/* ============ Logorow ============ */
.logorow .container {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding-top: 16px; padding-bottom: 13px;
}
.tagline { font-size: 12.5px; letter-spacing: 1.6px; text-transform: uppercase; color: #666; line-height: 1.7; }
.tagline b { display: block; font-size: 13px; color: var(--navy); }
.site-logo { text-align: center; }
.logo-img { height: 66px; width: auto; display: inline-block; }
.langbtn {
  justify-self: end; background: var(--navy); color: #fff; border: 0; border-radius: 5px;
  font-size: 16px; font-weight: 700; padding: 10px 22px; line-height: 1.2;
  font-family: var(--bangla); min-height: 44px;
}
.langbtn:hover { background: var(--red); color: #fff; }
/* Button shows ENGLISH while the page is Bangla (lang="bn"): the
   artifact's .langbtn.en — Roboto 13px, letter-spaced. Button shows
   বাংলা while the page is English (lang="en"): the default above,
   SolaimanLipi 16px. lang tracks the PAGE language (header.php +
   main.js agree); keying this rule off lang="en" styled the বাংলা
   label in Roboto and the ENGLISH label in SolaimanLipi — backwards
   vs the artifact (Round 1 re-read, v1.0.6). */
.langbtn[lang="bn"] { font-family: var(--sans); font-size: 13px; letter-spacing: 1px; }

/* ============ Main navigation (sticky) ============ */
.mainnav { background: var(--navy); position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 14px rgba(27,30,77,.3); }
.mainnav .container { display: flex; align-items: center; gap: 2px; position: relative; }
.nav-toggle {
  display: none; background: transparent; border: 0; color: #fff;
  padding: 10px 12px; flex: 0 0 auto;
}
.nav-toggle .bar { display: block; width: 24px; height: 3px; background: #fff; margin: 5px 0; }
.home-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 48px; color: #fff; flex: 0 0 auto;
}
.home-icon svg { width: 21px; height: 21px; fill: #fff; }
.home-icon:hover { background: var(--red); }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 48px; background: transparent; border: 0; color: #e8edf6; flex: 0 0 auto;
}
.iconbtn svg { width: 21px; height: 21px; fill: currentColor; }
.iconbtn:hover { background: var(--red); color: #fff; }
.mainnav ul.menu { display: flex; flex-wrap: wrap; align-items: stretch; }
.mainnav ul.menu > li { display: flex; position: relative; }
.mainnav ul.menu a {
  display: flex; align-items: center; padding: 13px 14px;
  color: #e8edf6; font-size: 15.5px; font-weight: 500; white-space: nowrap; min-height: 48px;
}
.mainnav ul.menu a:hover { background: var(--red); color: #fff; }
/* Active item: whole item solid red, white text. No underline, no purple box. */
.mainnav ul.menu > li.current-menu-item > a,
.mainnav ul.menu > li.current-category-ancestor > a,
.mainnav ul.menu > li.current-post-ancestor > a,
.mainnav ul.menu > li.current_page_item > a {
  background: var(--red); color: #fff; border-bottom: 0;
}
/* Sub-menus: hidden by default, absolute dropdowns below the parent item.
   They must NEVER flow inline inside the bar (that stretched it to ~290px).
   v1.0.4: NO dropdown arrow — the preview has none. */
.mainnav ul.menu .sub-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  min-width: 220px;
  background: var(--navy-deep);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  z-index: 1000;
  padding: 0;
}
.mainnav ul.menu .sub-menu li { display: block; position: relative; }
.mainnav ul.menu .sub-menu a {
  display: block; padding: 11px 18px; font-size: 14px;
  border-top: 1px solid rgba(255,255,255,.1); white-space: nowrap;
}
.mainnav ul.menu .sub-menu a:hover { background: var(--red); color: #fff; }
/* Open on hover (desktop), keyboard focus, or the .sub-open class set by JS
   (touch / hamburger menu). */
.mainnav ul.menu > li:hover > .sub-menu,
.mainnav ul.menu > li:focus-within > .sub-menu,
.mainnav ul.menu > li.sub-open > .sub-menu { display: block; }
/* Third-level sub-menus fly out to the right of their parent item. */
.mainnav ul.menu .sub-menu .sub-menu { top: 0; left: 100%; }
.nav-search-form { display: none; background: var(--navy-deep); padding: 10px 0; border-top: 1px solid rgba(255,255,255,.18); }
.nav-search-form.open { display: block; }
.nav-search-form form { display: flex; gap: 8px; }
.nav-search-form input[type="search"] {
  flex: 1; padding: 10px 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; min-width: 0;
}
.nav-search-form input[type="submit"], .nav-search-form button[type="submit"] {
  background: var(--red); color: #fff; border: 0; border-radius: 4px; padding: 0 20px; font-weight: 700; font-size: 15px; min-height: 44px;
}

/* ============ Breaking ticker ============ */
.ticker { background: #f4f5fa; border-bottom: 1px solid var(--line); }
.ticker .container { display: flex; gap: 14px; align-items: center; padding-top: 6px; padding-bottom: 6px; }
.ticker-label {
  background: var(--red); color: #fff; font-weight: 700; font-size: 11.5px;
  letter-spacing: 1.6px; text-transform: uppercase; padding: 5px 10px; flex: 0 0 auto;
}
.ticker-items { overflow: hidden; flex: 1; display: flex; align-items: center; min-height: 30px; }
.ticker-items a { color: #222; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker-items a:hover { color: var(--red); }
.ticker-dot { color: var(--red); margin-right: 6px; }

/* ============ Layout ============ */
/* The homepage hero carries its own 26px top padding (artifact) and
   the category/article crumbs carry 18px — the main wrapper adds no
   top gap of its own, or the hero would sit 20px too low. */
.site-main { padding: 0 0 8px; }
.layout { display: flex; gap: 28px; align-items: flex-start; }
.layout-main { flex: 1; min-width: 0; }
.layout-rail { flex: 0 0 320px; width: 320px; }
@media (max-width: 1024px) {
  .layout { flex-direction: column; }
  .layout-rail { flex: 1 1 auto; width: 100%; }
}

/* ============ Blocks & section heads (artifact) ============ */
.block { padding: 26px 0 8px; border-top: 1px solid var(--line); margin-top: 26px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-title {
  font-family: var(--serif); font-weight: 800; font-size: 22px;
  text-transform: uppercase; letter-spacing: .3px; color: var(--ink); margin: 0;
}
.sec-title::after { content: ""; display: block; width: 52px; height: 3px; background: var(--red); margin-top: 6px; }
.sec-title span { color: var(--red); }
.sec-title a { color: inherit; }
.sec-title a:hover { color: var(--red); }
.sec-more { font-size: 14px; font-weight: 700; color: var(--red); white-space: nowrap; padding: 6px 0; background: none; border: 0; }

/* ============ Hero (full width) ============ */
.hero { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 28px; padding: 26px 0 6px; }
.hero-top { display: grid; grid-template-columns: 295px minmax(0,1fr); gap: 26px; align-items: start; }
.hero-top.no-media { grid-template-columns: 1fr; }
.kicker {
  display: block;
  color: var(--red); font-size: 12.5px; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase; margin: 4px 0 10px;
}
.hero-lead-text h1 {
  font-family: var(--serif); font-weight: 800; font-size: 35px; line-height: 1.18; margin: 0 0 14px;
}
.hero-lead-text h1 a { color: var(--ink); }
.hero-lead-text h1 a:hover { color: var(--red); }
.hero-lead-text .excerpt { font-size: 16.5px; line-height: 1.55; color: #4a4a4a; margin: 0; }
.hero-img { display: block; }
.hero-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.secondary {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px;
  border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px;
}
.story > a { display: block; margin-bottom: 10px; }
.story img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.story h3 { font-family: var(--serif); font-weight: 700; font-size: 19.5px; line-height: 1.3; margin: 0 0 7px; }
.story h3 a { color: var(--ink); }
.story h3 a:hover { color: var(--red); }
.story p { font-size: 14.5px; line-height: 1.5; color: #555; margin: 0; }
.headlines {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  border-top: 1px solid var(--line); margin-top: 24px;
}
.hl-cell {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line); min-height: 76px;
}
.hl-cell:nth-child(3n+2), .hl-cell:nth-child(3n) { border-left: 1px solid var(--line); }
.hl-cell:nth-child(3n+1) { padding-left: 0; }
.hl-cell img { width: 84px; height: 58px; object-fit: cover; flex: 0 0 84px; display: block; }
.hl-cell .t { font-family: var(--serif); font-weight: 700; font-size: 16.5px; line-height: 1.35; color: var(--ink); }
.hl-cell:hover .t { color: var(--red); }
.allnews { display: flex; justify-content: center; padding: 22px 0 8px; }
.allnews a {
  display: inline-flex; align-items: center; background: var(--navy); color: #fff; font-size: 17px; font-weight: 700;
  padding: 13px 44px; border-radius: 5px; min-height: 48px;
}
.allnews a:hover { background: var(--red); color: #fff; }
.hero-rail { display: flex; flex-direction: column; gap: 22px; }
.hero-rail .ad-slot { margin: 0; }

/* Latest / Most Read / By The Numbers row.
   The artifact's LM headings are plain Playfair h2s — NO red underline
   bar (the .sec-title ::after bar belongs on section heads only). */
.lm { display: grid; grid-template-columns: 1fr 1fr 340px; gap: 40px; }
.lm h2 { font-family: var(--serif); font-size: 19px; font-weight: 800; text-transform: uppercase; margin: 0 0 6px; color: var(--ink); }
.lm h2 span { color: var(--red); }
.latest-list a {
  display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 15.5px; color: #222;
}
.latest-list a:last-child { border-bottom: 0; }
.latest-list a:hover { color: var(--red); }
.latest-list .dot { color: var(--red); font-weight: 700; }
.mr-list a { display: flex; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mr-list a:last-child { border-bottom: 0; }
.mr-num {
  font-family: var(--serif); font-weight: 800; font-size: 24px; color: var(--red);
  flex: 0 0 40px; line-height: 1;
}
.mr-list .t { font-family: var(--serif); font-weight: 700; font-size: 16.5px; line-height: 1.35; color: var(--ink); }
.mr-list a:hover .t { color: var(--red); }

/* By The Numbers card — figures ONLY, NO comparison chart. The
   preview's Nov-2026 vs Nov-2025 chart (+13% YoY) was an
   illustrative placeholder with made-up figures — never publish it. */
.btn-card {
  background: var(--red-soft); border: 1px solid var(--red-line);
  border-top: 4px solid var(--red); padding: 18px 18px 14px;
}
.btn-title { font-family: var(--serif); font-weight: 800; font-size: 19px; text-transform: uppercase; margin: 0 0 2px; }
.btn-title span { color: var(--red); }
.btn-date { font-size: 12.5px; color: #666; letter-spacing: .6px; text-transform: uppercase; margin: 0 0 12px; }
.btn-big { font-family: var(--serif); font-weight: 900; font-size: 40px; line-height: 1; color: var(--navy); }
.btn-big small { font-size: 17px; font-weight: 700; }
.btn-cap { font-size: 14px; color: #444; margin: 6px 0 14px; line-height: 1.5; }
.btn-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--red-line); padding-top: 12px; }
.btn-stats .v { font-family: var(--serif); font-weight: 800; font-size: 19px; color: var(--ink); }
.btn-stats .k { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: .6px; margin-top: 2px; }
.btn-src { font-size: 11.5px; color: #999; margin: 12px 0 0; }

/* ============ Spotlight ============ */
.spot { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 26px; align-items: center; }
.spot.no-media { grid-template-columns: 1fr; }
.spot > a { display: block; }
.spot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.spot h3 { font-family: var(--serif); font-weight: 800; font-size: 27px; line-height: 1.25; margin: 0 0 12px; }
.spot h3 a { color: var(--ink); }
.spot h3 a:hover { color: var(--red); }
.spot p { font-size: 15.5px; line-height: 1.55; color: #555; margin: 0; }

/* ============ Category sections (.cat) ============ */
.cat { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 28px; }
.cat-lead > a { display: block; margin-bottom: 12px; }
.cat-lead img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.cat-lead h3 { font-family: var(--serif); font-weight: 800; font-size: 24px; line-height: 1.28; margin: 0 0 8px; }
.cat-lead h3 a { color: var(--ink); }
.cat-lead h3 a:hover { color: var(--red); }
.cat-lead p { font-size: 15px; line-height: 1.55; color: #555; margin: 0; }
.titem { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.titem:first-child { padding-top: 2px; }
.titem:last-child { border-bottom: 0; }
.titem > a { flex: 0 0 112px; display: block; }
.titem img { width: 112px; height: 76px; object-fit: cover; display: block; }
.titem .t { font-family: var(--serif); font-weight: 700; font-size: 16.5px; line-height: 1.33; margin: 0; }
.titem .t a { color: var(--ink); }
.titem .t a:hover { color: var(--red); }
.titem .d { font-size: 13px; line-height: 1.45; color: #666; margin: 3px 0 0; }

/* ============ Opinion & Analysis (full width, red-soft) ============ */
.opinion { background: var(--red-soft); border-top: 0; }
.op-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 30px; }
.op-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--red-line); align-items: flex-start; }
.op-item > a { flex: 0 0 96px; display: block; }
.op-item img { width: 96px; height: 72px; object-fit: cover; display: block; }
.op-item h3 { font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.35; margin: 0 0 5px; }
.op-item h3 a { color: var(--ink); }
.op-item h3 a:hover { color: var(--red); }
.op-item p { font-size: 13px; color: #777; margin: 0; }

/* ============ Trade / Energy / Diaspora / Startup mini-row ============ */
.mini-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 26px; }
.mini h2 {
  font-family: var(--serif); font-weight: 800; font-size: 18px; text-transform: uppercase;
  color: var(--ink); padding-bottom: 8px; border-bottom: 2px solid var(--navy); margin: 0 0 12px;
}
.mini h2 a { color: var(--ink); }
.mini h2 a:hover { color: var(--red); }
.mini .lead-img { display: block; margin-bottom: 9px; }
.mini .lead-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.mini .lead-t {
  display: block; font-family: var(--serif); font-weight: 700; font-size: 16.5px;
  line-height: 1.35; color: var(--ink); margin-bottom: 4px;
}
.mini .lead-t:hover { color: var(--red); }
.mini .titem { padding: 9px 0; gap: 10px; }
.mini .titem > a { flex-basis: 72px; }
.mini .titem img { width: 72px; height: 52px; }
.mini .titem .t { font-family: var(--sans); font-weight: 500; font-size: 14.5px; line-height: 1.4; color: #2b2b2b; }

/* ============ Corporate (full width, deep navy) ============ */
.corporate { background: var(--navy); color: #dbe3f2; border-top: 0; }
.corporate .sec-title { color: #fff; }
.corporate .sec-title a { color: #fff; }
.corporate .sec-more { color: var(--red-pale); }
.corporate .cat-lead h3 a { color: #fff; }
.corporate .cat-lead h3 a:hover { color: var(--red-pale); }
.corporate .cat-lead p { color: #b9c6de; }
.corporate .titem { border-color: rgba(255,255,255,.18); }
.corporate .titem .t a { color: #fff; }
.corporate .titem .t a:hover { color: var(--red-pale); }
.corporate .titem .d { color: #9fb0cc; }

/* ============ Long Read (1 large feature) ============ */
.lr-img { position: relative; }
.lr-img > a { display: block; }
.lr-img img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; display: block; }
.lr-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 38px 26px 18px;
  background: linear-gradient(transparent, rgba(24,26,64,.88));
}
.lr-cap h3 {
  font-family: var(--serif); font-weight: 800; font-size: 27px; line-height: 1.25;
  color: #fff; margin: 0; max-width: 760px;
}
.lr-cap h3 a { color: #fff; }
.lr-cap h3 a:hover { color: var(--red-pale); }
.lr-img.no-media .lr-cap { position: static; background: var(--navy); padding: 18px 22px; }
.lr-excerpt { font-size: 15.5px; line-height: 1.55; color: #555; margin: 12px 0 0; max-width: 820px; }

/* ============ Diplomatics (full width, mist) ============ */
.diplo { background: var(--mist); border-top: 0; }
.diplo-grid { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 28px; align-items: stretch; }
.diplo-cover { position: relative; overflow: hidden; min-height: 240px; }
.diplo-cover > a { position: absolute; inset: 0; display: block; }
.diplo-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.diplo-cover .shade { position: absolute; inset: 0; background: linear-gradient(200deg, rgba(27,30,77,.25), rgba(27,30,77,.88)); }
.diplo-cover .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; color: #fff; }
.diplo-cover .brand { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--red-pale); font-weight: 700; }
.diplo-cover .big { font-family: var(--serif); font-weight: 900; font-size: 32px; line-height: 1.12; margin-top: 6px; }
.diplo-items { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 28px; }
.diplo-items .titem { border-color: #d6d9e8; }
.diplo-items .titem .d { color: #555a75; }

/* ============ In Case You Missed It ============ */
.missed-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
.missed-tag {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--red); margin: 0 0 6px;
}
.miss-item > a { display: block; margin-bottom: 10px; }
.miss-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.miss-item h3 { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.35; margin: 0 0 6px; }
.miss-item h3 a { color: var(--ink); }
.miss-item h3 a:hover { color: var(--red); }
.miss-item p { font-size: 14.5px; line-height: 1.5; color: #555; margin: 0; }

/* ============ Ads (light-grey DEMO AD boxes, per the preview) ============ */
.ad-slot { text-align: center; margin: 0 auto; }
/* T1 sits below the hero (14px gap), B1 after Market (22px gap) — the
   artifact's own inline margins. Rail/sidebar slots take their gap
   from the rail/sidebar flex gap, not from a slot margin. */
.ad-t1 { margin-top: 14px; }
.ad-b1 { margin-top: 22px; }
.ad-label { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #999; margin-bottom: 4px; }
.ad-box {
  background: var(--ad-bg); border: 1px solid var(--ad-line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px;
}
.ad-box .adbrand { font-family: var(--serif); font-weight: 800; font-size: 21px; color: var(--ad-text); letter-spacing: .4px; }
.ad-box .adsize { font-size: 12px; color: var(--ad-size); margin-top: 5px; letter-spacing: 1px; }
.ad-t1 .ad-box { width: 970px; max-width: 100%; height: 90px; margin: 0 auto; }
.ad-b1 .ad-box { width: 970px; max-width: 100%; height: 120px; margin: 0 auto; }
.ad-r1 .ad-box, .ad-r2 .ad-box, .ad-r3 .ad-box, .ad-sidebar .ad-box { width: 300px; max-width: 100%; height: 250px; }
.ad-article .ad-box { width: 300px; max-width: 336px; height: 250px; margin: 0 auto; }
.ad-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
  background: #fff; border-top: 1px solid var(--line-dark);
  box-shadow: 0 -6px 18px rgba(0,0,0,.12); margin: 0;
}
.ad-sticky .ad-inner { max-width: 970px; margin: 0 auto; padding: 6px 40px 6px 12px; position: relative; text-align: center; }
.ad-sticky .ad-label { font-size: 9.5px; letter-spacing: 1.5px; color: #999; display: block; }
/* Brand + size on ONE centred line, exactly as the preview's sticky bar. */
.ad-sticky .adbrand { font-family: var(--serif); font-weight: 800; font-size: 17px; color: var(--ad-text); padding: 8px 0; }
.ad-sticky .sticky-size { font-family: var(--sans); font-weight: 400; font-size: 11.5px; letter-spacing: 1px; color: var(--ad-size); }
.ad-sticky .adsize { font-size: 11.5px; letter-spacing: 1px; color: var(--ad-size); }
.ad-sticky .ad-close {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; background: none; font-size: 20px; color: #666;
}
.ad-sticky .ad-close:hover { color: var(--red); }
.ad-sticky.hidden { display: none; }
body.has-sticky-ad { padding-bottom: 90px; }

/* ============ Category pages (#catView) ============ */
.cat-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 34px; align-items: start; }
/* The artifact's category rail starts 14px below the list's top. */
.cat-layout .rail { margin-top: 14px; }
.crumb { font-size: 13px; color: #666; padding: 18px 0 0; }
.crumb a { color: var(--navy); font-weight: 700; }
.crumb a:hover { color: var(--red); }
.crumb .sep { margin: 0 6px; }
.cat-title {
  font-family: var(--serif); font-weight: 800; font-size: 30px;
  text-transform: uppercase; color: var(--ink); margin: 10px 0 4px;
}
.cat-title span { color: var(--red); }
.cat-desc { color: #555; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px; }
.chip {
  border: 1px solid var(--line-dark); background: #fff; border-radius: 999px;
  padding: 8px 16px; min-height: 38px; font-size: 14px; color: #333;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.chip.on:hover { background: var(--red); border-color: var(--red); color: #fff; }
.cat-lead-big {
  display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 26px; align-items: center;
  padding: 20px 0 6px; border-bottom: 1px solid var(--line);
}
.cat-lead-big.no-media { grid-template-columns: 1fr; }
.cat-lead-big > a { display: block; }
.cat-lead-big img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.cat-lead-big h2 { font-family: var(--serif); font-weight: 800; font-size: 29px; line-height: 1.22; margin: 0 0 10px; }
.cat-lead-big h2 a { color: var(--ink); }
.cat-lead-big h2 a:hover { color: var(--red); }
.cat-lead-big p { font-size: 15.5px; line-height: 1.55; color: #555; margin: 0; }
.cat-list-big { max-width: 860px; }
.cat-list-big .cat-list-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cat-list-big .cat-list-item:last-child { border-bottom: 0; }
.cat-list-big .thumb { flex: 0 0 150px; display: block; }
.cat-list-big .thumb img { width: 150px; height: 100px; object-fit: cover; display: block; }
.cat-list-big h3 { font-family: var(--serif); font-weight: 700; font-size: 18.5px; line-height: 1.32; margin: 0 0 6px; }
.cat-list-big h3 a { color: var(--ink); }
.cat-list-big h3 a:hover { color: var(--red); }
.cat-list-big p { font-size: 14px; line-height: 1.5; color: #555; margin: 0; }
.cat-list-item.is-hidden { display: none; }
.showmore { display: flex; justify-content: center; padding: 20px 0 6px; }
.show-more-btn {
  background: #fff; border: 1.5px solid var(--navy); color: var(--navy);
  font-weight: 700; font-size: 15.5px; padding: 12px 40px; border-radius: 5px; min-height: 48px;
}
.show-more-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.backhome {
  display: inline-flex; gap: 8px; align-items: center;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 15px;
  padding: 11px 22px; border-radius: 5px; border: 0; min-height: 46px; margin: 18px 0 4px;
}
.backhome:hover { background: var(--red); color: #fff; }

/* ============ Rail (sidebar.php) & article sidebar ============ */
.rail { display: flex; flex-direction: column; gap: 26px; }
.rail-block { margin-bottom: 28px; }
.rail-block:last-child { margin-bottom: 0; }
/* Sidebar headings are plain Playfair h2s — NO red underline bar,
   exactly like the artifact's .side-block h2 / .lm h2. */
.rail-block h3.rail-title {
  font-family: var(--serif); font-weight: 800; font-size: 19px; text-transform: uppercase;
  color: var(--ink); margin: 0 0 6px;
}
.rail-block h3.rail-title span { color: var(--red); }
.side-block h2 { font-family: var(--serif); font-weight: 800; font-size: 19px; text-transform: uppercase; margin: 0 0 6px; color: var(--ink); }
.side-block h2 span { color: var(--red); }
.numbered-list li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.numbered-list li:last-child { border-bottom: 0; }
.numbered-list .num {
  font-family: var(--serif); font-weight: 800; font-size: 22px; color: var(--red);
  min-width: 34px; line-height: 1.1;
}
.numbered-list a { color: var(--ink); font-weight: 700; font-size: 15px; font-family: var(--serif); }
.numbered-list a:hover { color: var(--red); }

/* ============ Single article (#articleView) ============ */
/* v1.0.5: grid children get min-width:0 — a grid item's automatic
   minimum (e.g. a long unbroken URL in the body) could otherwise
   force the article track wider than its 1fr share and squeeze the
   text column. The grid itself already matches the artifact exactly
   (minmax(0,1fr) 340px, gap 42px). */
.art-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 42px; align-items: start; padding-top: 14px; }
.art-layout > * { min-width: 0; }
/* The breadcrumb sits ABOVE the two-column grid, full width — the
   artifact's .art-crumb, not inside the article column. */
.breadcrumb { font-size: 13px; color: #666; padding: 18px 0 0; margin: 0; }
.breadcrumb a { color: var(--navy); font-weight: 700; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { margin: 0 6px; }
.art-kicker { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.kcat { font-size: 12.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--red); }
.art-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.art-chips .chip { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.art-title { font-family: var(--serif); font-weight: 800; font-size: 41px; line-height: 1.16; color: var(--ink); margin: 0 0 14px; }
.art-dek { font-size: 19px; line-height: 1.55; color: #555; margin: 0 0 20px; }
.byline-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 12px 0; margin-bottom: 22px;
}
.byline-who { display: flex; gap: 12px; align-items: center; }
.byline-ava {
  width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--red-pale);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 800; font-size: 16px; flex: 0 0 46px;
}
.byline-name { font-size: 14.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--ink); line-height: 1.3; }
.byline-meta { font-size: 13px; color: #666; margin-top: 2px; }
.sharebtns { display: flex; gap: 8px; align-items: center; }
.shlabel { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: #666; font-weight: 700; margin-right: 2px; }
.sharebtn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-dark);
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy); padding: 0;
}
.sharebtn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.sharebtn svg { width: 16px; height: 16px; fill: currentColor; }
.art-hero { margin: 0 0 8px; }
.art-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.art-caption { font-size: 13.5px; color: #777; line-height: 1.55; padding: 9px 0 4px; border-bottom: 1px solid var(--line); margin: 0 0 24px; }
.art-caption b { color: #555; }
.art-body { max-width: 730px; overflow-wrap: break-word; }
.art-body p { font-size: 17.5px; line-height: 1.78; color: #2b2b2b; margin: 0 0 20px; }
/* Direct child only — the artifact's selector is .art-body>p:first-of-type:
   a broader selector would put a drop cap on the pull quote's paragraph too. */
.art-body>p:first-of-type::first-letter {
  font-family: var(--serif); font-weight: 800; font-size: 52px; line-height: .95;
  float: left; padding: 4px 10px 0 0; color: var(--navy);
}
.art-body h2 { font-family: var(--serif); font-weight: 800; font-size: 23px; line-height: 1.3; margin: 30px 0 12px; }
.art-body h3 { font-family: var(--serif); font-weight: 800; font-size: 20px; line-height: 1.3; margin: 26px 0 10px; }
.art-body img { max-width: 100%; height: auto; }
/* The artifact's body links inherit the body colour, no underline. */
.art-body a { color: inherit; text-decoration: none; }
.art-body a:hover { color: var(--red); }
.art-body blockquote {
  border-left: 4px solid var(--red); margin: 20px 0; padding: 6px 0 6px 18px;
  font-family: var(--serif); font-size: 21px; font-style: italic; color: var(--ink);
}
.pullquote { margin: 30px 0; padding: 6px 0; }
.pullquote .qm { font-family: var(--serif); font-size: 44px; line-height: .6; color: var(--red); display: block; margin-bottom: 12px; }
.pullquote p { font-family: var(--serif); font-weight: 700; font-size: 24px; line-height: 1.4; color: var(--navy); margin: 0; }
.alsoread { background: var(--red-soft); border: 1px solid var(--red-line); padding: 16px 18px; margin: 26px 0; }
.alsoread .ar-label { font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--red); margin: 0 0 6px; }
.alsoread a { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.35; color: var(--ink); text-decoration: none; }
.alsoread a:hover { color: var(--red); }
.art-ad { margin: 28px 0; }
.art-ad .ad-slot { margin: 0 auto; }
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 6px; }
.tagrow .tlabel { font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #666; align-self: center; margin-right: 2px; }
.tagrow a { padding: 6px 14px; border: 1px solid var(--line-dark); border-radius: 999px; background: #fff; font-size: 13px; color: #333; }
.tagrow a:hover { border-color: var(--red); color: var(--red); }
.authorbox { display: flex; gap: 16px; border-top: 2px solid var(--navy); padding: 20px 0 4px; margin-top: 22px; align-items: flex-start; }
.authorbox .avatar { width: 56px; height: 56px; flex: 0 0 56px; }
.authorbox .avatar img { width: 56px; height: 56px; border-radius: 50%; display: block; }
.authorbox h3.author-name { font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--ink); margin: 0 0 5px; }
.authorbox .author-bio { font-size: 14.5px; line-height: 1.6; color: #555; margin: 0; }
.art-side { display: flex; flex-direction: column; gap: 26px; position: sticky; top: 70px; align-self: start; }
.side-latest a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: #222; }
.side-latest a:last-child { border-bottom: 0; }
.side-latest a:hover .t { color: var(--red); }
.side-latest img { width: 74px; height: 54px; object-fit: cover; flex: 0 0 74px; display: block; }
.rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: var(--navy); color: #fff; font-size: 14px; font-weight: 700;
  padding: 11px 22px; border-radius: 5px; z-index: 120; display: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
}
.toast.show { display: block; }

/* ============ Index / search lists & misc ============ */
.post-meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.post-meta .byline { text-transform: uppercase; font-weight: 700; color: var(--body); }
.page-head { margin: 6px 0 18px; }
.page-head h1 {
  font-family: var(--serif); font-weight: 800; font-size: 34px; text-transform: uppercase; margin: 4px 0 0;
}
.cat-list .cat-list-item { display: flex; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cat-list .cat-list-item .thumb { flex: 0 0 220px; }
.cat-list .cat-list-item .thumb img { width: 220px; height: 124px; object-fit: cover; display: block; }
.cat-list .cat-list-item h3 { font-size: 21px; font-weight: 700; }
.cat-list .cat-list-item h3 a { color: var(--ink); }
.cat-list .cat-list-item h3 a:hover { color: var(--red); }
.cat-list .cat-list-item .excerpt { color: var(--body); font-size: 15px; }
.search-results .search-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.search-results .search-item h3 { font-size: 21px; font-weight: 700; }
.search-results .search-item h3 a { color: var(--ink); }
.search-results .search-item h3 a:hover { color: var(--red); }
.not-found { text-align: center; padding: 60px 0; }
.not-found h1 { font-size: 44px; }

/* ============ Footer ============ */
.site-footer { background: var(--footer-bg); color: var(--footer-link); margin-top: 40px; }
.site-footer a { color: var(--footer-link); }
.site-footer a:hover { color: #fff; }
.foot-main { display: grid; grid-template-columns: 1.55fr .85fr .9fr .8fr .95fr; gap: 38px; padding: 44px 0 34px; }
.foot-logo { display: inline-flex; background: #fff; border-radius: 8px; padding: 10px 16px; }
.foot-logo img { height: 62px; width: auto; display: block; }
.foot-desc { font-size: 15px; line-height: 1.65; color: var(--footer-link); max-width: 340px; margin: 22px 0 0; }
.foot-socials { display: flex; gap: 10px; margin-top: 22px; }
.foot-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.45); border-radius: 6px; color: #fff;
}
.foot-socials a:hover { background: var(--red); border-color: var(--red); }
.foot-socials a svg { width: 18px; height: 18px; fill: #fff; }
.foot-contact { margin-top: 24px; font-size: 14.5px; line-height: 1.55; color: var(--footer-link); }
.foot-contact p { margin: 0 0 7px; }
.foot-contact p:last-child { margin-bottom: 0; }
.foot-contact a { color: #fff; }
.foot-col h4 {
  font-family: var(--sans); font-size: 14.5px; font-weight: 700; letter-spacing: 2.2px;
  text-transform: uppercase; color: var(--footer-head); margin: 4px 0 16px;
}
.foot-col a { display: block; padding: 7px 0; font-size: 15px; color: var(--footer-link); min-height: 34px; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.16); padding: 20px 0 28px; }
.foot-bottom .container { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; }
.foot-bottom .copy { font-size: 13.5px; color: var(--footer-copy); white-space: nowrap; padding-top: 2px; }
.foot-bottom .credits { font-size: 13.5px; line-height: 1.7; color: var(--footer-copy); text-align: center; flex: 1; max-width: 720px; }
.foot-bottom .motto { font-size: 13.5px; letter-spacing: 1.6px; color: var(--footer-copy); white-space: nowrap; padding-top: 2px; text-transform: uppercase; }

/* ============ Responsive ============ */
/* v1.0.5: the 10 menu items + home/search icons must fit on ONE row
   at ~1024px too (live v1.0.4: the menu wrapped to two rows on article
   pages). Tighter padding/font below 1240px; flex-wrap stays wrap so
   the dropdown sub-menus (absolute, hanging below the bar) are never
   clipped by an overflow rule — the artifact clips its overflow, but
   the artifact has no dropdowns and the theme does. */
@media (max-width: 1240px) {
  .mainnav ul.menu a { padding: 13px 11px; font-size: 15px; }
}
@media (max-width: 1080px) {
  .hero-top { grid-template-columns: 250px minmax(0,1fr); }
  .hero-lead-text h1 { font-size: 30px; }
  .lm { grid-template-columns: 1fr 1fr; gap: 34px; }
  .btn-card { grid-column: 1 / -1; }
  .mini-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .missed-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .foot-main { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
  .foot-bottom .container { flex-wrap: wrap; }
  .foot-bottom .credits { order: 3; flex: 1 1 100%; max-width: none; }
  .tagline { display: none; }
  .logorow .container { grid-template-columns: 1fr auto 1fr; }
  .art-layout { grid-template-columns: minmax(0,1fr) 300px; gap: 32px; }
  .art-title { font-size: 35px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  /* Mobile menu: an absolute dropdown below the bar (artifact), not an
     in-flow block that pushes the page down. */
  .mainnav ul.menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy-deep); flex-direction: column; align-items: stretch;
    box-shadow: 0 14px 20px rgba(0,0,0,.3); padding: 6px 16px 12px;
    width: auto; flex-basis: auto;
  }
  .mainnav ul.menu.open { display: flex; }
  .mainnav ul.menu > li { display: block; }
  .mainnav ul.menu a { padding: 12px 10px; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.14); min-height: 48px; }
  .mainnav ul.menu > li:last-child > a { border-bottom: 0; }
  .mainnav ul.menu > li.current-menu-item > a,
  .mainnav ul.menu > li.current-category-ancestor > a,
  .mainnav ul.menu > li.current-post-ancestor > a,
  .mainnav ul.menu > li.current_page_item > a { border-bottom-color: var(--red); }
  /* Mobile: sub-menus are static, stacked, and open ONLY via the JS
     tap-to-toggle (.sub-open). Hover must not open them on touch screens. */
  .mainnav ul.menu .sub-menu {
    position: static; display: none; min-width: 0;
    background: var(--navy-deep); box-shadow: none;
  }
  .mainnav ul.menu > li:hover > .sub-menu,
  .mainnav ul.menu > li:focus-within > .sub-menu { display: none; }
  .mainnav ul.menu > li.sub-open > .sub-menu { display: block; }
  .mainnav ul.menu .sub-menu a { padding: 11px 18px 11px 34px; font-size: 15px; }
  .mainnav ul.menu .sub-menu .sub-menu { left: 0; }
  .mainnav ul.menu .sub-menu .sub-menu a { padding-left: 52px; }
  .logorow .container { grid-template-columns: 1fr auto; padding: 14px 16px 10px; }
  .site-logo { text-align: left; }
  .logo-img { height: 52px; }
  .hero { grid-template-columns: minmax(0,1fr); gap: 20px; padding-top: 18px; }
  .hero-top { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .hero-lead-text h1 { font-size: 27px; }
  .hero .excerpt { font-size: 15.5px; }
  .hero-rail { flex-direction: column; align-items: center; }
  .hero-rail .ad-slot { width: 100%; max-width: 340px; }
  .secondary { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .headlines { grid-template-columns: minmax(0,1fr); }
  .hl-cell { border-left: 0 !important; padding-left: 0; padding-right: 0; }
  .lm { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .spot { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .spot h3 { font-size: 23px; }
  .cat { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .op-grid { grid-template-columns: minmax(0,1fr); }
  .diplo-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .diplo-items { grid-template-columns: minmax(0,1fr); }
  .diplo-cover { min-height: 200px; }
  .foot-main { grid-template-columns: repeat(2, 1fr); gap: 30px; padding: 34px 0 26px; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-desc { max-width: 520px; }
  .foot-bottom .container { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
  .foot-bottom .credits { text-align: center; }
  .foot-bottom .copy, .foot-bottom .motto { white-space: normal; }
  .ad-t1 .ad-box, .ad-b1 .ad-box { height: 64px; }
  .lr-img img { aspect-ratio: 16 / 10; }
  .lr-cap { padding: 30px 16px 14px; }
  .lr-cap h3 { font-size: 21px; }
  .cat-lead-big { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .cat-lead-big h2 { font-size: 24px; }
  .cat-list-big .thumb { flex-basis: 104px; }
  .cat-list-big .thumb img { width: 104px; height: 72px; }
  .cat-list-big h3 { font-size: 16.5px; }
  .cat-layout { grid-template-columns: minmax(0,1fr); }
  .cat-layout .rail { margin-top: 6px; }
  .art-layout { grid-template-columns: minmax(0,1fr); gap: 30px; }
  .art-side { position: static; }
  .art-title { font-size: 28px; }
  .art-dek { font-size: 16.5px; }
  .art-body p { font-size: 16.5px; }
  .rel-grid { grid-template-columns: minmax(0,1fr); }
  .byline-row { align-items: flex-start; }
  .ticker-items a { font-size: 13.5px; white-space: normal; text-overflow: clip; }
  .cat-list .cat-list-item { flex-direction: column; }
  .cat-list .cat-list-item .thumb { flex: 1 1 auto; }
  .cat-list .cat-list-item .thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}
@media (max-width: 480px) {
  .mini-row { grid-template-columns: minmax(0,1fr); }
  .missed-grid { grid-template-columns: minmax(0,1fr); }
  .topbar .date { font-size: 12px; }
  .socials { gap: 6px; }
  .socials a { width: 28px; height: 28px; }
  .socials a svg { width: 14px; height: 14px; }
  .langbtn { padding: 9px 16px; font-size: 15px; }
  .logo-img { height: 44px; }
  .foot-logo img { height: 48px; }
  .sec-title { font-size: 19px; }
  .titem img { width: 96px; height: 66px; }
  .titem > a { flex-basis: 96px; }
  .btn-big { font-size: 34px; }
  /* The sticky ad's size line wraps below the brand on narrow screens. */
  .sticky-size { display: block; white-space: nowrap; font-size: 10px !important; margin-top: 2px; }
}

/* ============ v1.0.2: font lock (extended v1.0.4) ============
   Live, the headlines and section titles rendered in a bold SANS-serif
   face instead of Playfair Display, although the theme's own rules say
   var(--serif). The cause is legacy injected CSS from the old theme's
   HFCM snippets (snippet 23, Source Serif 4 + Inter) still firing
   through wp_head/wp_footer: its rules outrank the theme's bare element
   selectors (h1/h2/h3). These rules re-assert the Playfair/Roboto
   pairing with enough specificity (and !important, as a last resort
   against the injected rules) that the design's fonts actually render.
   v1.0.4 extends the lock to every new artifact class name (sec-title,
   story, hl-cell, titem, mini, btn-card, spot, lr-cap, diplo-cover,
   art-title, pullquote, cat-title, mr-num, latest-list). The lasting
   fix is to deactivate the conflicting HFCM snippets (see README).
   NOTE: .mini .titem .t is Roboto 500 by design (artifact) — it is
   re-asserted as sans AFTER the serif lock below. */
body h1, body h2, body h3, body h4,
.site-main h1, .site-main h2, .site-main h3, .site-main h4,
.sec-title, .rail-block h3.rail-title,
.hero-lead-text h1, .story h3, .hl-cell .t,
.cat-lead h3, .titem .t, .mini h2, .mini .lead-t,
.miss-item h3, .btn-title, .btn-big, .btn-stats .v,
.spot h3, .lr-cap h3, .diplo-cover .big,
.art-title, .art-body h2, .art-body h3, .pullquote p, .pullquote .qm,
.cat-title, .cat-lead-big h2, .cat-list-big h3,
.mr-num, .mr-list .t, .numbered-list a,
.cat-list .cat-list-item h3, .search-results .search-item h3,
.page-head h1, .ad-box .adbrand, .ad-sticky .adbrand,
.byline-ava {
  font-family: var(--serif) !important;
}
body, .article-body, .art-body, .art-body p, .excerpt, .art-dek,
.post-meta, .topbar, .mainnav ul.menu a, .chips .chip, .art-chips .chip,
.tagrow a, .authorbox h3.author-name, .byline-meta, .byline-name,
.latest-list a, .side-latest a, .titem .d, .op-item p, .mini .titem .t,
.btn-date, .btn-cap, .btn-stats .k, .btn-src, .spot p, .cat-lead p,
.lr-excerpt, .miss-item p, .diplo-cover .brand, .art-caption,
.cat-lead-big p, .cat-list-big p, .ad-box .adsize, .ad-sticky .adsize,
.foot-col h4, .foot-col a, .foot-desc, .foot-contact {
  font-family: var(--sans) !important;
}
/* Artifact exception: mini-row list titles are Roboto 500, not serif. */
.mini .titem .t { font-family: var(--sans) !important; }

/* ============ v1.0.3: Google Translate Element UI lock ============
   The theme loads the Google Translate Element itself (functions.php)
   so the বাংলা button works without the GTranslate plugin's
   front-end script. The element's own widget and top banner must
   never be visible — the theme's বাংলা/ENGLISH button is the only
   control. The element still translates the page via the googtrans
   cookie; hiding its chrome does not stop translation. */
/* v1.0.5: the element's container is positioned OFF-SCREEN (see
   header.php), not display:none — the Translate Element initialises
   unreliably inside a display:none container. */
#bdt-google-translate { position: absolute !important; left: -9999px !important; top: 0 !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget,
.goog-te-gadget-simple,
.goog-te-menu-value,
.goog-te-combo { display: none !important; }
body { top: 0 !important; }

/* ============ v1.0.5: reduced motion (artifact) ============
   The artifact disables all transitions/animations when the user
   prefers reduced motion; the ticker JS honours the same preference. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
