/* ============================================================
   The Balochistan Post — homepage sections
   Enqueued on the front page only. Depends on tokens.css + app.css.
   Sections (DOM order): hero · videos · trending+feature · featured
   reports · interviews · editorials · investigation · opinion+
   newsletter · press/desk+ad · sections-row.
   Plus the front-page style modes (accent / architecture / voice).
   Tokens: tokens.css (--section-gap, --grid-gap, --r-card/--r-thumb/--r-pill,
   --bp-*, --font-head, --cat-*). No section rule carries its own number for
   a colour, radius, gap or breakpoint.
   ============================================================ */

/* ── Shared: section title bar (AJ hairline rule, no tick) ───── */
.secbar { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; padding-top: 16px; border-top: var(--sec-rule); }
.secbar h2 { font-family: var(--tbp-ff-sec, var(--font-head)); font-weight: 700; font-size: calc(20px * var(--tbp-fsx-sec, 1)); line-height: calc(1.2 * var(--tbp-lhx-sec, 1) * var(--head-lh-x)); margin: 0; color: var(--ink-900); letter-spacing: -0.005em; }
.secbar h2::before { display: none; }
/* Section "more" links are .tbp-more (app.css, beside .tbp-cat): one look
   on every page, not only here. */
.secbar .more { margin-inline-start: auto; }
/* Brand red is 2.7:1 on the dark surface; small red text there is lifted.
   The hero rail's category label is a .tbp-cat: html.dark lifts it through
   --cat-color (app.css), so the Filled label style can still turn it white. */
html.dark .hero .feed-head h2 { color: var(--red-text-dark); }

/* ═══ 0. HOMEPAGE RHYTHM — one seam, one number ══════════════════════
   The gap between two sections is --section-gap (tokens.css, 72px), set as
   row-gap on the flex container (inc/home-layout.php). Nothing inside the
   home stack may add to it: the bands' own padding, a section's first or
   last child, the rails' bottom padding, a trailing link's tap padding and
   the custom blocks' margins were all measured in the seam before, which is
   why one page showed seams of 72, 78, 86, 104 and 136px.

   The bands keep their padding everywhere ELSE they are used — the same
   classes render inside blocks on ordinary pages — so every reset here is
   scoped to .tbp-home-main rather than rewritten at the source. Every home
   pattern is shaped `.wrap > section.<name>-band`, hero included, so the
   structural selector reaches all of them and any future section inherits
   the rhythm without being added to a list. */
.tbp-home-main .wrap > section { padding-block: 0; margin-block: 0; }
.tbp-home-main .wrap > section > :first-child { margin-block-start: 0; padding-block-start: 0; }
.tbp-home-main .wrap > section > :last-child { margin-block-end: 0; padding-block-end: 0; }
/* A .secbar that opens a section needs no head padding; nested one level
   down (.op-shell, .tr-grid, .press-shell) it would reappear as an uneven
   seam. --sec-rule-pad is the Broadsheet mode's room under its rule. */
.tbp-home-main .wrap > section .secbar:first-child { padding-block-start: var(--sec-rule-pad); }
/* Rails pad their bottom for a scrollbar that is hidden anyway; the Press
   Desk "more" link pads itself for touch; the bottom widget zone carries a
   page margin. Inside the stack the seam is the only vertical space. */
.tbp-home-main .video-carousel, .tbp-home-main .lens-rail, .tbp-home-main .iv-grid { padding-block-end: 0; }
/* The last row of a list keeps its divider padding under nothing — 12–15px
   that landed in the seam whenever that column was the tallest. A divider
   sits UNDER each row, never under the last one. */
.tbp-home-main :is(.tr-item, .ed-item, .op-card, .spr-item, .press-list .item, .sec-card .list .li, .hero .rail-item):last-child { padding-block-end: 0; border-bottom: 0; }
.tbp-home-main .tbp-wzone { margin-block: 0; }
.tbp-home-main .tbp-sec .tbp-wzone { margin-block-start: var(--grid-gap); } /* a band under a section: inside its seam, a grid gap below the content */
/* A section whose feed is empty renders no markup at all, but its .tbp-sec
   wrapper survives — and an empty flex item still takes a row-gap on each
   side, so it would silently double one seam. */
.tbp-home-main > .tbp-sec:empty { display: none; }

/* ═══ I. HERO — "Featured & Live" module (design import) ═════════════
   Photo + solid red headline band; latest rail (uniform, hairline dividers);
   live state swaps in the LIVE screen + an updates timeline. Font: IBM Plex
   Sans Arabic (700 titles / 400 body). Light + dark via theme tokens. */
.hero { padding: 4px 0 34px; } /* rail above provides the top gap — was 30px, made 26/74 lopsided */
/* (hero module heading removed 2026-07-04 — the lead story speaks for itself;
   in live mode the on-screen براہ راست tag + updates head carry the signal) */

.hero .hgrid { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: var(--col-gap); align-items: start; }
.hero .hmain { min-width: 0; }

/* Featured / live lead card — whole card links via .card-link on top */
.hero .feature { position: relative; }
.hero .feature .card-link { position: absolute; inset: 0; z-index: 3; }
/* Shaped to the newsroom's own crop, not to a fixed 438px. At the full 896px
   column that box was 896x438 -- 2.05:1 against a 7:4 photograph -- so `cover`
   scaled the image until its width fitted and cut 37px off the top and 37px off
   the bottom. Nothing resamples the file; the crop is entirely this box's shape.
   At 7/4 a 7:4 upload fills it exactly, watermark and all. (Height goes 438 ->
   ~512px at full width, which lands within 8px of the live hero's 16/9 screen.) */
.hero .feat-media { position: relative; border-radius: var(--r-card) var(--r-card) 0 0; overflow: hidden; aspect-ratio: var(--tbp-ar-lead, 7 / 4); background: var(--thumb, #000) center/cover no-repeat; }
.hero .feat-band { position: relative; background: var(--red-grain) 0 0 / var(--red-grain-size), var(--hero-grad); background-blend-mode: overlay, normal; border-radius: 0 0 var(--r-card) var(--r-card); padding: 18px 30px; overflow: hidden; min-height: 132px; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }
/* The place, under the live band's date: a dateline in the date's type,
   bolder so it reads as the where, not another date. */
.hero .feat-where { position: relative; z-index: 2; display: block; margin-top: 2px; font-family: var(--tbp-ff-date, var(--date-font)); font-size: calc(var(--date-size) * var(--tbp-fsx-date, 1)); font-weight: 700; color: var(--date-on-color); }
.hero .feat-kk { position: relative; z-index: 2; }
/* On the red band a chip style turns white (a red chip vanished into it). */
.hero .feat-band .tbp-cat--on { color: var(--cat-band-color); background: var(--cat-band-bg); }
.hero .feat-h { position: relative; z-index: 2; margin: 0; color: #fff; text-wrap: pretty; }
.hero .feat-date { position: relative; z-index: 2; }
.hero .feature:is(:hover, :focus-within) .feat-h { text-decoration: underline; text-underline-offset: 3px; }

/* Latest rail — uniform items, hairline dividers, thumb on the inline-end */
.hero .rail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hero .rail-head .dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
/* The pulse ring is a ::after scaled and faded (composited); the box-shadow it replaced repainted every frame. */
.hero .rail-head .dot::after, .hero .feed-head .ttl .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; opacity: .55; animation: hpulse 1.8s ease-out infinite; will-change: transform, opacity; }
@keyframes hpulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(3); opacity: 0; } }
.hero .rail-head h2 { font-family: var(--font-head-sans); font-weight: 700; font-size: 20px; margin: 0; color: var(--tbp-text); white-space: nowrap; }
.hero .rail-item { display: grid; grid-template-columns: var(--thumb-w) minmax(0, 1fr); gap: 14px; align-items: start; padding: 15px 0; text-decoration: none; transition: transform .18s; }
/* The first ROW sits flush under the rail head; with two columns that is two items. */
.hero .rail-list > .rail-item:first-child, .hero .rail-list[data-cols="2"] > .rail-item:nth-child(2) { padding-top: 4px; }
.hero .rail-h { margin: 0; color: var(--tbp-text-2); transition: color .15s; }
.hero .rail-thumb { width: var(--thumb-w); aspect-ratio: var(--thumb-ratio); border-radius: var(--r-thumb); overflow: hidden; background: var(--paper-sunken) center/cover no-repeat; }
.hero .rail-more { display: flex; margin-top: 16px; }
/* Measure-&-fit equalizer: without JS the rail shows Studio's count — the
   server marks every story past it .rail-over. With JS, .js-fit takes over and
   the script shows whole rows until the rail reaches the bottom of the .hmain
   column, in every mode (static / live×1 update / live×6); the DOM carries up
   to nine stories so a long live column has rows to grow into. Off below the
   1024px single-column break. */
.hero .rail-item.rail-over { display: none; }
/* Two columns without the equalizer — 769–1024, where the hero stacks, and
   above 1024 until app.js has fitted the rail (it adds .js-fit): whole rows
   only, the next story instead of a half-empty row, and a lone last story
   hidden when the count is odd and no next story exists. */
@media (min-width: 769px) {
  .hero .rail:not(.js-fit) .rail-list[data-cols="2"] > .rail-item:not(.rail-over):nth-of-type(odd) + .rail-item.rail-over { display: grid; }
  .hero .rail:not(.js-fit) .rail-list[data-cols="2"] > .rail-item:not(.rail-over):nth-of-type(odd):last-of-type { display: none; }
}
.hero .rail.js-fit .rail-item { display: grid; }
.hero .rail.js-fit .rail-item.is-clipped { display: none; }
/* Equalised (app.js): the rail is exactly the main column's height and its
   rows share the slack evenly — both columns end on the same line. */
.hero .rail.js-fit.is-equal { display: flex; flex-direction: column; }
.hero .rail.js-fit.is-equal .rail-list { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); grid-auto-rows: 1fr; align-content: stretch; }
.hero .rail.js-fit.is-equal .rail-more { flex: none; }

/* Hero BLOCK rail: count is authoritative (no app.js equalizer). Beats the
   nth-of-type clamp above so exactly rail_count items show on any page. */
.hero .rail--fixed .rail-item { display: grid; }

/* Hero layout variants (Studio-selectable). Default (lead-rail) is the base .hero. */
.hero--rail-lead .hgrid { grid-template-columns: 1fr 1.55fr; }
.hero--rail-lead .hmain { order: 2; }
.hero--rail-lead .rail  { order: 1; }
.hero--banner-row .hgrid { grid-template-columns: 1fr; gap: var(--grid-gap); }
/* The banner-row rail is a card row: its list is a grid (data-cols, kind grid), no dividers. */
.hero--banner-row .rail-list > * { border-top: 0; }

/* Live screen overlays */
.hero .live-media { position: relative; border-radius: var(--r-card) var(--r-card) 0 0; overflow: hidden; }
.hero .live-screen { position: relative; aspect-ratio: 16/9; background: #000 center/cover no-repeat; }
/* The lead picture is an <img> (the LCP element — see tbp_hero_lead_img); it fills the frame like the background it replaced. */
.hero .feat-media .lead-img, .hero .live-screen .lead-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .live-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.5) 0%, transparent 26%); }
.hero .live-tag { position: absolute; top: 15px; left: 15px; z-index: 4; display: inline-flex; align-items: center; gap: 8px; background: var(--red); color: #fff; font-family: var(--font-ar); font-weight: 700; font-size: 13px; padding: 6px 13px; border-radius: var(--r-thumb); box-shadow: 0 6px 22px color-mix(in srgb, var(--red) 45%, transparent); }
.hero .live-tag .bd { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.hero .live-tag .bd::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; opacity: .7; animation: livedot 1.6s ease-out infinite; will-change: transform, opacity; }
@keyframes livedot { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(2.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero .rail-head .dot::after, .hero .feed-head .ttl .dot::after, .hero .live-tag .bd::after { animation: none; opacity: 0; } }
.hero .live-brand { position: absolute; top: 14px; right: 16px; z-index: 4; direction: ltr; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 17px; letter-spacing: -.02em; color: rgba(255,255,255,.92); text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.hero .live-progress { position: absolute; bottom: 0; inset-inline: 0; height: 3px; background: var(--red); z-index: 5; }

/* Live updates timeline */
.hero .feed-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 6px; padding-bottom: 6px; }
.hero .feed-head .ttl { display: flex; align-items: center; gap: 9px; }
.hero .feed-head .ttl .dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.hero .feed-head h2 { font-family: var(--font-head-sans); font-weight: 700; font-size: 20px; margin: 0; color: var(--red); white-space: nowrap; }
.hero .feed-head .count { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--tbp-text-3); direction: ltr; white-space: nowrap; }
/* Urdu variant of the counter: house Naskh, RTL, no mono letter-spacing. */
.hero .feed-head .count.count-ur { font-family: var(--font-urdu); font-size: 13px; letter-spacing: 0; direction: rtl; }
.hero .feed { position: relative; }
/* The spine between the markers — centred on the dot axis (centre = 9.5px),
   softly faded at both ends so it doesn't hard-cut at the first/last marker.
   It was a 1px --tbp-line hairline with 14px fades: on the light page, with
   two updates, nothing of it could be seen. --ink-300 reads in both modes. */
.hero .feed::before { content: ""; position: absolute; inset-inline-start: 8.5px; top: 18px; bottom: 22px; width: 2px; background: var(--ink-300); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8px, #000 calc(100% - 8px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 8px, #000 calc(100% - 8px), transparent); }
.hero .feed-item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px 0; padding-inline-start: 24px; text-decoration: none; }
/* Every update is live → calm red marker centred on the spine with a slow, gentle
   breath (staggered so they don't blink in unison). */
.hero .feed-item::after { content: ""; position: absolute; inset-inline-start: 5px; top: 21px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); z-index: 2; animation: feeddot 3s ease-in-out infinite; }
.hero .feed-item:nth-child(2n)::after { animation-delay: 1.5s; }
@keyframes feeddot { 0%, 100% { opacity: 1; } 50% { opacity: .58; } }
/* Newest update = the live edge: slightly larger, a soft steady halo, no breath. */
.hero .feed-item:first-child::after { width: 11px; height: 11px; inset-inline-start: 4px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 13%, transparent); animation: none; }
.hero .feed-item.brk { background: color-mix(in srgb, var(--red) 5%, transparent); border-radius: var(--r-card); }
.hero .feed-item.brk::after { width: 11px; height: 11px; inset-inline-start: 4px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 14%, transparent); animation: none; }
.hero .fi-side { display: flex; align-items: center; gap: 8px; min-width: 58px; padding-top: 1px; }
/* A live update's time is the time of day, not a card date, but it wears
   the one date look: font, size, weight and grey from the --date-* tokens. */
.hero .fi-time { font-family: var(--tbp-ff-date, var(--date-font)); font-weight: var(--date-weight); font-size: calc(var(--date-size) * var(--tbp-fsx-date, 1)); color: var(--date-color); direction: ltr; }
/* An update from before today: its day under its time (hero-render.php, live-notice.js). */
.hero .fi-day { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; line-height: 1.3; white-space: nowrap; color: var(--date-color); }
.hero .chip { font-family: var(--font-ar); font-weight: 700; font-size: 10px; padding: 2px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.hero .chip-brk { background: var(--red); color: #fff; }
.hero .chip-up { background: var(--paper-sunken); color: var(--tbp-text-2); }
.hero .fi-text { font-family: var(--font-ar); font-weight: 500; font-size: 15px; line-height: 1.85; margin: 0; color: var(--tbp-text); }
.hero .fi-text b { font-weight: 700; }
/* Media indicator — themed inline icon in place of a raw URL in a live update */
.hero .fi-media { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: var(--r-thumb); background: var(--paper-sunken); color: var(--tbp-text-2); vertical-align: -6px; margin-inline-start: 7px; transition: color .15s, background .15s; }
.hero .fi-media svg { width: 14px; height: 14px; }
.hero .fi-media--youtube { color: #e0000b; }
.hero .feed-item:hover .fi-media { background: color-mix(in srgb, var(--red) 10%, transparent); }
.hero .fi-media.is-play { cursor: pointer; }
.hero .fi-media.is-play:hover { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }

/* Hero lead: native media play overlay + inline player */
.hero .tbp-play { position: absolute; inset: 0; margin: auto; width: 66px; height: 66px; border-radius: 50%; border: none; background: color-mix(in srgb, var(--red) 92%, transparent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5; box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: transform .15s, background .15s; }
.hero .tbp-play svg { width: 28px; height: 28px; margin-inline-start: 3px; }
.hero .tbp-play--audio svg { margin-inline-start: 0; }
.hero .tbp-play:hover { transform: scale(1.06); background: var(--red); }
.hero .is-playing .tbp-play, .hero .is-playing .live-tag, .hero .is-playing .live-brand { display: none; }
.hero .tbp-inline-player { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; background: #000; border: 0; object-fit: cover; }
.hero .tbp-inline-player.tbp-mp-audiowrap { display: flex; align-items: flex-end; background: transparent; }
.hero .tbp-mp-audiowrap .tbp-mp-audio { width: 100%; }

/* Shared media lightbox (live-feed videos) */
.tbp-lb { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; }
.tbp-lb.open { display: flex; }
.tbp-lb-bd { position: absolute; inset: 0; background: rgba(0,0,0,.82); }
.tbp-lb-box { position: relative; z-index: 1; width: min(920px, 92vw); }
.tbp-lb-x { position: absolute; top: -42px; inset-inline-end: 0; width: 34px; height: 34px; border: 0; border-radius: var(--r-card); background: rgba(255,255,255,.14); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.tbp-lb-x:hover { background: rgba(255,255,255,.26); }
.tbp-lb-body { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--r-card); overflow: hidden; }
.tbp-lb-body .tbp-mp-iframe, .tbp-lb-body .tbp-mp-video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tbp-lb-body .tbp-mp-audiowrap { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px; }
.tbp-lb-body .tbp-mp-audio { width: 100%; }
.hero .feed-more { margin-top: 16px; }

/* ── Premium: refined card hover (headline tint + subtle image lift) ── */
.sec-card .feature .img, .press-lead .img { transition: filter .3s ease; }
.sec-card .feature:hover .img, .press-lead:hover .img { filter: brightness(1.05) saturate(1.04); }
.sec-card .feature h3, .press-lead h3 { transition: color .15s ease; }

/* ═══ I-b. DOSSIER RAIL ══════════════════════════════════════ */
/* Circular "ongoing themes" rail under the masthead. Red story-ring (system accent). */
.dossier-rail { position: relative; padding: 16px 0 0; }
.dossier-row { display: flex; justify-content: safe center; gap: 22px; overflow-x: auto; padding: 10px 2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.dossier-row::-webkit-scrollbar { display: none; }
.dossier { flex: none; display: flex; flex-direction: column; align-items: center; gap: 9px; width: 76px; text-decoration: none; scroll-snap-align: start; }
.dossier .d-img { width: 64px; height: 64px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 2px var(--tbp-paper), 0 0 0 4px var(--red); transition: transform .22s ease, box-shadow .22s ease; display: flex; align-items: center; justify-content: center; }
/* Imageless dossier → monogram initial (see dossier-rail.php), never a blank disc. */
.dossier .d-init { font-family: var(--font-urdu); font-weight: 700; font-size: 26px; line-height: 1; color: rgba(255,255,255,.92); text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.dossier .d-label { font-family: var(--font-urdu); font-weight: 700; font-size: 12.5px; line-height: 1.3; color: var(--ink-800); text-align: center; }
.dossier:hover .d-img { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--tbp-paper), 0 0 0 4px var(--tbp-red); }
.dossier:hover .d-label { color: var(--red); }
.dos-arrow { position: absolute; top: 30px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--tbp-line-2); background: var(--tbp-paper); color: var(--ink-700); display: none; align-items: center; justify-content: center; cursor: pointer; }
.dos-arrow svg { width: 15px; height: 15px; }
.dos-arrow.prev { inset-inline-start: -6px; }
.dos-arrow.next { inset-inline-end: -6px; }
/* Arrows appear only when the row actually overflows (7+ dossiers), not on hover. */
.dossier-rail.has-overflow .dos-arrow { display: flex; }
html[dir="rtl"] .dos-arrow svg { transform: scaleX(-1); }
/* Overflow (7+): start-aligned scroll with a soft fade on both ends so it reads as more. */
.dossier-rail.has-overflow .dossier-row { justify-content: flex-start; -webkit-mask-image: linear-gradient(to right, transparent, #000 46px, #000 calc(100% - 46px), transparent); mask-image: linear-gradient(to right, transparent, #000 46px, #000 calc(100% - 46px), transparent); }
/* Single (1): a labelled, start-aligned "featured topic" so one circle reads intentionally. */
.dossier-rail.is-single { display: flex; align-items: center; gap: 16px; }
.dossier-rail.is-single .dossier-row { justify-content: flex-start; }
.dossier-kicker-rail { flex: 0 0 auto; font-family: var(--font-urdu); font-weight: 700; font-size: 13px; color: var(--red); }
/* Editor-selectable card shape (Settings → Dossiers). Default = the 50% circle
   above; these override only when a non-default shape is chosen. Radius is
   size-independent, so the same rules also cover the mobile (56px) circles. */
.dossier[data-shape="rounded"] .d-img { border-radius: var(--r-card); }
.dossier[data-shape="square"] .d-img { border-radius: 0; }

/* ═══ II. VIDEO CAROUSEL ═════════════════════════════════════ */
/* Video rail — AJ reels style: portrait 9:16 cards, clean title BELOW the
   card (not overlaid), white circle arrows riding the rail edge. */
.videos-band { padding: 36px 0 40px; }
.video-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 158px; gap: var(--rail-gap); overflow-x: auto; overflow-y: visible; padding: 4px 0 14px; scroll-snap-type: x proximity; scrollbar-width: none; }
.video-carousel::-webkit-scrollbar { display: none; }
.video-card { display: block; text-decoration: none; scroll-snap-align: start; cursor: pointer; }
.vc-media { position: relative; display: block; aspect-ratio: 9/16; border-radius: var(--r-card); border: var(--card-border); overflow: hidden; background: linear-gradient(135deg, var(--ink-700), var(--ink-950)) center/cover no-repeat; }
.vc-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 64%, rgba(0,0,0,.5) 100%); }
.vc-media .play { position: absolute; bottom: 10px; inset-inline-start: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; z-index: 2; transition: background .15s, border-color .15s; }
.vc-media .play svg { width: 13px; height: 13px; color: var(--white); transform: translateX(1px); }
html[dir="rtl"] .vc-media .play svg { transform: scaleX(-1) translateX(-1px); }
.video-card:hover .play { background: var(--red); border-color: var(--red); }
.vc-media .dur { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; background: rgba(0,0,0,.65); color: var(--white); font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; border-radius: var(--r-thumb); }
/* A card's text under its picture (videos, lens): label, title, date. */
.card-txt { display: block; margin-top: 10px; padding-inline: 2px; }
.vc-title { margin: 0; color: var(--ink-800); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color .15s; }
html.dark .vc-title { color: var(--tbp-text-2); }
.carousel-wrap { position: relative; }
/* Arrows: white circles with a soft shadow, centered on the MEDIA (158px wide
   9:16 card ≈ 281px tall → center ≈ 144px incl. top padding). */
.car-arrow { position: absolute; top: 144px; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: var(--white); border: 1px solid var(--tbp-line); box-shadow: 0 2px 10px rgba(0,0,0,.14); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 4; color: var(--ink-800); transition: background-color .15s, border-color .15s, color .15s; }
.car-arrow:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.car-arrow svg { width: 15px; height: 15px; }
.car-arrow.prev { inset-inline-end: -14px; }
.car-arrow.next { inset-inline-start: -14px; }
html[dir="rtl"] .car-arrow svg { transform: scaleX(-1); }
html.dark .car-arrow { background: #1c1c1c; border-color: #333; color: var(--tbp-text); }
/* Video lightbox */
.tbp-vlb { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; }
.tbp-vlb .vlb-back { position: absolute; inset: 0; background: rgba(0,0,0,.88); }
.tbp-vlb .vlb-box { position: relative; z-index: 2; width: min(920px, 92vw); aspect-ratio: 16/9; background: #000; border-radius: var(--r-card); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.tbp-vlb.is-portrait .vlb-box { width: auto; height: min(86vh, 820px); aspect-ratio: 9/16; }
.tbp-vlb iframe, .tbp-vlb video { width: 100%; height: 100%; border: 0; display: block; }
.tbp-vlb .vlb-x { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.tbp-vlb .vlb-x:hover { background: var(--red); }
/* The way out of the overlay and into the article. It cannot sit inside
   .vlb-box: that box clips (overflow:hidden, so the media takes its corner
   radius), which swallowed the link whole — it was in the DOM and invisible
   on screen. The stage carries the player and the link as two rows. */
.tbp-vlb .vlb-stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.tbp-vlb .vlb-full { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-urdu); font-weight: 600; font-size: 13px; color: rgba(255,255,255,.82); }
.tbp-vlb .vlb-full::after { content: "←"; font-family: var(--font-mono); }
.tbp-vlb .vlb-full:hover { color: #fff; }
.vc-media.v1 { background: linear-gradient(135deg, #3a4452, #161c24); }

/* ═══ PHOTO ESSAY (custom "gallery" layout) ══════════════════════ */
/* Photo-forward image grid: bigger tiles than the card grid, a title caption
   overlaid on each tile, subtle hover zoom. Tiles open the image lightbox. */
.tbp-blk-gallery .secbar { margin-bottom: 14px; }
.tbp-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); }
.tbp-gtile { position: relative; display: block; aspect-ratio: 4/3; border-radius: var(--r-card); border: var(--card-border); overflow: hidden; text-decoration: none; background: var(--paper-sunken); box-shadow: 0 1px 3px rgba(0,0,0,.10); }
.tbp-gimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.tbp-gtile:hover .tbp-gimg { transform: scale(1.06); }
.tbp-gtile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.72) 100%); }
.tbp-gcap { position: absolute; inset-inline: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.tbp-gcap .t { color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Image lightbox (photo-essay) — namespaced .tbp-glx (distinct from .tbp-vlb) */
.tbp-glx { position: fixed; inset: 0; z-index: 600; display: none; align-items: center; justify-content: center; }
.tbp-glx.open { display: flex; }
.tbp-glx .glx-back { position: absolute; inset: 0; background: rgba(0,0,0,.9); }
.tbp-glx .glx-box { position: relative; z-index: 2; margin: 0; max-width: min(1040px, 94vw); display: flex; flex-direction: column; }
.tbp-glx .glx-img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: var(--r-card); background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.tbp-glx .glx-cap { margin-top: 14px; text-align: center; }
.tbp-glx .glx-t { display: block; font-family: var(--font-naskh); font-weight: 700; font-size: 18px; line-height: 1.6; color: #fff; }
.tbp-glx .glx-read { display: inline-block; margin-top: 8px; font-family: var(--font-ar); font-weight: 700; font-size: 14px; color: var(--red-lift); text-decoration: none; }
.tbp-glx .glx-read:hover { color: #fff; }
.tbp-glx .glx-x { position: absolute; top: -42px; inset-inline-end: 0; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.tbp-glx .glx-x:hover { background: var(--red); }

/* ═══ MEDIA STORY (custom "mediastory" layout) ═══════════════════ */
/* An inline audio/video PLAYER + a clickable PLAYLIST. Player on the start side,
   playlist on the end side (desktop); stacks on mobile. RTL-safe (logical props). */
.tbp-blk-media .secbar { margin-bottom: 14px; }
.tbp-ms { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: var(--grid-gap); align-items: start; }
.tbp-ms-player { min-width: 0; }
.tbp-ms-stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-card); border: var(--card-border); overflow: hidden; background: #000; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tbp-ms-stage video, .tbp-ms-stage iframe, .tbp-ms-video, .tbp-ms-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.tbp-ms-video { object-fit: contain; }
.tbp-ms-audio { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; background-size: cover; background-position: center; background-color: var(--ink-800); }
.tbp-ms-audio::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,22,28,.35), rgba(20,22,28,.85)); }
.tbp-ms-badge { position: absolute; top: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; color: #fff; opacity: .92; }
.tbp-ms-badge svg { width: 100%; height: 100%; }
.tbp-ms-aud { position: relative; z-index: 2; width: calc(100% - 24px); margin: 12px; }
.tbp-ms-meta { padding: 12px 2px 0; }
.tbp-ms-title { margin: 4px 0 6px; color: var(--ink-900); }
.tbp-ms-read { font-family: var(--font-ar); font-weight: 700; font-size: 13px; color: var(--red); text-decoration: none; }
.tbp-ms-read:hover { text-decoration: underline; }
.tbp-ms-list { display: flex; flex-direction: column; gap: 8px; max-height: 480px; overflow: auto; }
.tbp-ms-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 8px; border: 0; border-radius: var(--r-card); background: var(--paper-sunken); cursor: pointer; font: inherit; color: inherit; }
.tbp-ms-row:hover { background: var(--paper-card); box-shadow: inset 0 0 0 1px var(--tbp-line); }
.tbp-ms-row.is-active { background: var(--paper-card); box-shadow: inset 0 0 0 1px var(--red); }
.tbp-ms-thumb { position: relative; flex: 0 0 auto; width: 64px; height: 44px; border-radius: var(--r-thumb); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tbp-ms-thumb::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.30); }
.tbp-ms-ic { position: relative; z-index: 2; width: 22px; height: 22px; color: #fff; display: flex; }
.tbp-ms-ic svg { width: 100%; height: 100%; }
.tbp-ms-rtitle { font-family: var(--font-head); font-weight: 600; font-size: 14px; line-height: calc(1.5 * var(--head-lh-x)); color: var(--ink-800); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.vc-media.v2 { background: linear-gradient(135deg, #44484f, #181a1e); }
.vc-media.v3 { background: linear-gradient(135deg, #3a4858, #151b24); }
.vc-media.v4 { background: linear-gradient(135deg, #3a4a4a, #141d1d); }
.vc-media.v5 { background: linear-gradient(135deg, #3f4258, #16182a); }
.vc-media.v6 { background: linear-gradient(135deg, #42455c, #181a2a); }
.vc-media.v7 { background: linear-gradient(135deg, #3f4852, #161c22); }
.vc-media.v8 { background: linear-gradient(135deg, #44484f, #181a1e); }

/* Aspect-ratio variants for the editable Videos block (Site Editor sidebar):
   portrait (default 9/16) · square 1/1 · wide 16/9 (YouTube). Wider cards for the
   wider ratios so thumbnails stay legible. */
.video-carousel.ar-square { grid-auto-columns: 208px; }
.video-carousel.ar-square .vc-media { aspect-ratio: 1/1; }
.video-carousel.ar-wide { grid-auto-columns: 288px; }
.video-carousel.ar-wide .vc-media { aspect-ratio: 16/9; }

/* ═══ III. TRENDING + FEATURE ════════════════════════════════ */
.trending-band { padding: 32px 0 40px; }
.tr-grid { display: flex; gap: var(--col-gap); align-items: start; }
.trending { background: transparent; padding: 0; flex: 0 0 340px; }
.trending .secbar { margin-bottom: 6px; }
.tr-item { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 18px; align-items: center; padding: 15px 0; }
.tr-txt { min-width: 0; }
.tr-item.is-clipped { display: none; } /* fitted to the column beside it (app.js) */
.tr-item h3 { margin: 0; color: var(--ink-800); transition: color .15s ease; }
.tr-item .n { font-family: var(--font-display); font-weight: 700; font-size: 38px; line-height: 1; text-align: center; color: var(--red); font-variant-numeric: tabular-nums; }
.tr-item:first-child .n { color: var(--tbp-red); }
/* Ranks use the system red in both modes (gold retired). */
html.dark .tr-item .n { color: var(--red); }
html.dark .tr-item:first-child .n { color: var(--tbp-red); }
/* Most read as Beads (Studio ▸ Most read ▸ Layout ▸ Beads): each story a round
   photo on one thread, its red ring filled by how much it was read against #1
   (--p, 0–100). Beside Editor's Pick, app.js adds .tr-fill to the row: the
   list takes the height of that column (its own basis is 0, so it never sets
   it), shows as many beads as fit and spreads them evenly. Without that (no
   JS, Editor's Pick hidden, a phone) it is a plain list: six, five on phones. */
.tr-beads { --col: 76px; --b: 62px; position: relative; display: grid; align-content: start; padding-inline-start: 2px; }
.tr-beads::before { content: ""; position: absolute; inset-inline-start: calc(var(--col) / 2 + 1px); top: calc(var(--col) / 2); bottom: calc(var(--col) / 2); width: 2px; background: var(--ink-300); }
html.dark .tr-beads::before { background: var(--ink-200); }
.tr-bead { position: relative; display: grid; grid-template-columns: var(--col) minmax(0, 1fr); gap: 14px; align-items: center; min-height: 0; padding: 12px 0; }
.tr-bead:nth-child(n+7) { display: none; }
.tr-bead.is-off { display: none; }
.tr-bead-ring { position: relative; z-index: 1; justify-self: center; width: var(--b); height: var(--b); border-radius: 50%; padding: 4px; box-sizing: border-box; background: conic-gradient(var(--tbp-red) calc(var(--p, 0) * 1%), var(--ink-150) 0); }
.tr-bead:first-child .tr-bead-ring { width: var(--col); height: var(--col); }
.tr-bead-img { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 3px solid var(--paper); box-sizing: border-box; background-size: cover; }
.tr-bead-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tr-bead h3 { margin: 0; color: var(--ink-800); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .15s ease; }
.tr-bead:first-child h3 { color: var(--ink-900); font-weight: 700; }
.tr-bead:not(:first-child) .tbp-cat { color: var(--ink-500); }
.tr-fill { align-items: stretch; }
.tr-fill .trending { display: flex; flex-direction: column; }
.tr-fill .tr-beads { flex: 1 1 0; min-height: 0; overflow: hidden; }
.tr-fill .tr-bead { padding: 0; }
.tr-fill .tr-bead:nth-child(n+7) { display: grid; }
.tr-fill .tr-bead.is-off { display: none; }
/* Little room (a short Editor's Pick): smaller beads, no section label. */
.tr-beads.is-compact { --col: 56px; --b: 46px; }
.tr-beads.is-compact .tbp-cat { display: none; }
@media (max-width: 768px) { .tr-bead:nth-child(n+6) { display: none; } }
.feature-stack { display: flex; flex-direction: column; gap: var(--grid-gap); flex: 1; min-width: 0; }
.feature-hero { position: relative; border-radius: var(--r-card); border: var(--card-border); overflow: hidden; aspect-ratio: 21/9; background: linear-gradient(135deg, #2a3a4a, #0a1218); }
.feature-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 40% at 50% 70%, rgba(150,170,200,0.15) 0%, transparent 60%), linear-gradient(180deg, transparent 40%, rgba(0,0,0,.6) 100%); }
/* The heading is a sibling ABOVE the hero now, not an overlay on it: same
   position, size and colour as every other section's. .feature-stack's own
   18px gap does the spacing, so it needs no bottom margin of its own. */
.feature-stack > .secbar { margin-bottom: 0; }
.feature-hero .fh-txt { position: absolute; bottom: 22px; inset-inline: 22px; z-index: 2; pointer-events: none; }
/* The headline is the link. The text box sits above the card's own link, so
   everything in it that is not a link lets the click through to the card
   beneath (the kicker, the date); the headline and any link keep theirs. */
.feature-hero .fh-txt a { pointer-events: auto; }
.feature-hero .label a { color: inherit; text-decoration: none; }
.feature-hero .label { color: var(--white); }
.feature-split { background: transparent; border: var(--frame-border); border-radius: var(--r-card); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
.feature-split .left { padding: 22px 26px; display: flex; flex-direction: column; border-inline-start: 1px solid var(--tbp-line); }
.feature-split .left .stories { row-gap: 12px; }
.feature-split .left .story { display: grid; grid-template-columns: var(--thumb-w) minmax(0, 1fr); gap: 12px; padding: 10px 0; align-items: start; }
.feature-split .left .story .img { width: var(--thumb-w); aspect-ratio: var(--thumb-ratio); border-radius: var(--r-thumb); background: linear-gradient(135deg, var(--ink-300), var(--ink-600)); }
.feature-split .left .story h4 { margin: 0; color: var(--ink-900); }
.feature-split .right { padding: 22px 26px; background: var(--paper-sunken); display: flex; flex-direction: column; justify-content: space-between; }
.feature-split .right .ttl { color: var(--ink-900); margin: 0; }
.feature-split .right .ttl-date { margin-bottom: 12px; }
.feature-split .right p { font-family: var(--font-urdu); font-weight: 500; font-size: 14px; line-height: 1.75; color: var(--ink-700); margin: 0; }
.feature-split .right .img { margin-top: 16px; aspect-ratio: 5/3; border-radius: var(--r-card); background: linear-gradient(135deg, var(--ink-300), var(--ink-600)); }

/* Hide either half independently (TBP Studio: Most read / Editor's Pick).
   flex .tr-grid lets the remaining column take the full width. */
.tbp-col--trending[hidden], .tbp-col--editors-pick[hidden] { display: none; }

/* ═══ VIII. FEATURED REPORTS ═════════════════════════════════ */
/* Special-report package (Asharq reference): full-bleed hero carrying the lead
   report's headline, with a white card overlapping its bottom — related rows
   on one side, a featured sub-report on the other. */
.reports-band { padding: 36px 0 44px; }
.sp-report { position: relative; }
.spr-hero { display: block; position: relative; aspect-ratio: 21/8; min-height: 340px; border-radius: var(--r-card); border: var(--card-border); overflow: hidden; background: linear-gradient(135deg, var(--ink-400), var(--ink-800)) center/cover no-repeat; text-decoration: none; }
.spr-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 78%); }
.spr-hero .spr-txt { position: absolute; bottom: 150px; inset-inline-start: 22px; inset-inline-end: 22px; z-index: 2; max-width: 90%; }
.spr-hero h3 { margin: 0; color: var(--white); text-shadow: 0 2px 14px rgba(0,0,0,.55); text-wrap: balance; transition: text-decoration-color .15s; }
.spr-card { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--col-gap); background: var(--paper-card); border-radius: var(--r-card); border: var(--card-border); box-shadow: 0 22px 60px rgba(0,0,0,.14); margin: -120px 44px 0; padding: 28px 34px 30px; }
html.dark .spr-card { background: var(--paper-card); box-shadow: 0 22px 60px rgba(0,0,0,.5); border: 1px solid var(--tbp-line); }
/* Rows stretch to the featured column's height — fewer related reports never
   leave a void at the card's bottom. */
.spr-list { min-width: 0; }
.spr-item { flex: 1 1 auto; display: grid; grid-template-columns: var(--thumb-w) minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; text-decoration: none; }
.spr-item .t { color: var(--ink-800); transition: color .15s; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.spr-item .spr-txt { display: block; min-width: 0; }
.spr-feat .spr-feat-date { margin-bottom: 8px; }
.spr-item .thumb { width: var(--thumb-w); aspect-ratio: var(--thumb-ratio); border-radius: var(--r-thumb); overflow: hidden; background: var(--paper-sunken) center/cover no-repeat; }
.spr-feat { display: flex; flex-direction: column; min-width: 0; text-decoration: none; }
/* Image grows to fill the column so the left panel isn't left half-empty. */
.spr-feat .img { display: block; flex: 1 1 auto; min-height: 240px; border-radius: var(--r-card); overflow: hidden; background: var(--paper-sunken) center/cover no-repeat; margin-bottom: 14px; }
.spr-feat .by { display: block; font-family: var(--font-urdu); font-size: 12px; color: var(--ink-400); margin-top: 8px; }
.spr-feat h4 { margin: 0; color: var(--ink-900); transition: color .15s; }
.spr-feat p { font-family: var(--font-urdu); font-weight: 400; font-size: 13.5px; line-height: 1.9; color: var(--ink-600); margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
html.dark .spr-item .t, html.dark .spr-feat h4 { color: var(--tbp-text); }

/* ═══ IX. INTERVIEWS ═════════════════════════════════════════ */
.interviews-band { padding: 40px 0 44px; }
.iv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
.iv-card { position: relative; border-radius: var(--r-card); border: var(--card-border); overflow: hidden; aspect-ratio: 3/4; cursor: pointer; background: linear-gradient(135deg, #42454c, #15171c); display: flex; flex-direction: column; justify-content: flex-end; }
.iv-card.c2 { background: linear-gradient(135deg, #3f4a4a, #101a1a); }
.iv-card.c3 { background: linear-gradient(135deg, #4a4253, #161220); }
.iv-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.05) 28%, rgba(0,0,0,.5) 58%, rgba(0,0,0,.92) 100%); }
/* The whole card is the link; the quote is the one readers and keyboards get. */
.iv-card .card-link { position: absolute; inset: 0; z-index: 2; }
.iv-card .quote-link { position: relative; z-index: 3; text-decoration: none; color: inherit; }
.iv-card .content { position: relative; z-index: 2; padding: 22px 22px 24px; color: var(--white); }
.iv-card .quote-mark { font-family: var(--font-display); font-weight: 700; font-size: 56px; line-height: 0.4; color: var(--tbp-red); display: block; height: 24px; }
.iv-card .quote { font-family: var(--font-head); font-weight: 700; font-size: 19px; line-height: calc(1.6 * var(--head-lh-x)); margin: 0 0 16px; color: var(--white); text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.iv-card .who { display: flex; align-items: center; gap: 11px; }
.iv-card .who .av { width: 38px; height: 38px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--ink-300), var(--ink-600)); background-size: cover; background-position: center; border: 2px solid rgba(255,255,255,.35); display: grid; place-items: center; }
/* No photo: the name's first letter, as the dossier rail does. */
.iv-card .who .av-i { font-family: var(--font-urdu); font-weight: 700; font-size: 16px; line-height: 1; color: var(--white); }
.iv-card .who .name { font-family: var(--font-urdu); font-weight: 700; font-size: 14px; color: var(--white); line-height: 1.3; }
.iv-card .who .role { font-family: var(--font-mono); font-size: 9px; color: rgba(255,255,255,.7); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 3px; }

/* ═══ X. EDITORIALS ══════════════════════════════════════════ */
/* Editorials — the paper's own voice: broadsheet opinion treatment. Thick ink
   rule over a quiet card, Nastaliq display headline, restrained sign-off; the
   list beside it is whole-row links with large quiet serif numerals. */
.editorial-band { padding: 40px 0 48px; }
/* Columns stretch together: the list's rows share the leftover height so its
   last row ends flush with the lead card's bottom — no dead corner. */
.ed-shell { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--col-gap); align-items: stretch; }
.ed-lead { background: var(--paper-sunken); border: var(--card-border); border-top: 3px solid var(--ink-900); border-radius: 0 0 var(--r-card) var(--r-card); padding: 30px 36px 28px; position: relative; }
html.dark .ed-lead { border-top-color: var(--tbp-text); }
/* Featured image bleeds to the card edges, under the ink rule. */
.ed-img { display: block; margin: -30px -36px 24px; height: 280px; background: var(--paper-card) center/cover no-repeat; }
.ed-lead-link { text-decoration: none; color: inherit; }
/* House headline voice: bold upright Naskh (Nastaliq display retired here —
   it fought the sitewide headline system). */
.ed-lead h3 { margin: 0; color: var(--tbp-text); transition: color .15s; }
.ed-lead .ed-lead-date { margin-bottom: 14px; }
.ed-lead p { font-family: var(--font-urdu); font-weight: 500; font-size: 16px; line-height: 1.95; color: var(--tbp-text-2); margin: 0 0 14px; }
.ed-lead p:last-of-type { margin-bottom: 0; }
.ed-lead .sign { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--tbp-line); font-family: var(--font-urdu); font-weight: 700; font-size: 14px; color: var(--tbp-text); display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ed-lead .sign span { font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--tbp-text-3); letter-spacing: 0.12em; }
.ed-list { display: flex; flex-direction: column; }
.ed-items { flex: 1; min-width: 0; }
.ed-list .secbar { margin-bottom: 6px; flex: none; }
/* Thumb rides the reading edge (inline-start) with the text right beside it —
   short titles leave their slack at the row's END, not as a hole in the middle. */
.ed-item { flex: 1 1 auto; display: grid; grid-template-columns: var(--thumb-w) minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; text-decoration: none; }
.ed-thumb { width: var(--thumb-w); aspect-ratio: var(--thumb-ratio); border-radius: var(--r-thumb); overflow: hidden; background: var(--paper-sunken) center/cover no-repeat; }
.ed-txt { min-width: 0; }
.ed-item h3 { margin: 0; color: var(--tbp-text); transition: color .15s; }

/* ═══ IV. INVESTIGATION (dark band) ══════════════════════════ */
.invest { background: var(--surface-inverse); color: var(--on-inverse); padding: 56px 0; margin: 8px 0; position: relative; }
.invest::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--red-lift); }
.invest-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--col-gap); align-items: center; }
.invest .img { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--ink-700), var(--ink-950)); border-radius: var(--r-card); position: relative; overflow: hidden; }
.invest .img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.5) 100%); }
.invest .img .meta { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2; font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,.85); background: rgba(0,0,0,.55); padding: 4px 8px; border-radius: var(--r-thumb); letter-spacing: 0.08em; text-transform: uppercase; }
.invest .kick { font-family: var(--font-mono); font-size: 11px; color: var(--red-lift); letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 16px; }
.invest h2 { margin: 0 0 18px; color: var(--white); }
.invest .deck { font-family: var(--font-urdu); font-weight: 500; font-size: 16px; line-height: 1.75; color: var(--ink-300); margin: 0 0 22px; }
.invest-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #1f1f1f; border-bottom: 1px solid #1f1f1f; padding: 18px 0; margin-bottom: 22px; }
.invest-stats .s { border-inline-end: 1px solid #1f1f1f; padding-inline-end: 12px; }
.invest-stats .s:last-child { border-inline-end: 0; }
.invest-stats .s .n { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--white); line-height: 1; font-variant-numeric: tabular-nums; }
.invest-stats .s .l { font-family: var(--font-urdu); font-size: 12px; color: var(--ink-400); margin-top: 4px; }
.invest .reporters { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-family: var(--font-mono); font-size: 10px; color: var(--ink-400); letter-spacing: 0.06em; text-transform: uppercase; }
.invest .reporters .avs { display: flex; }
.invest .reporters .av { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #444, #1a1a1a); border: 2px solid var(--ink-950); margin-inline-start: -6px; }
.invest .reporters .av:first-child { margin-inline-start: 0; }
.invest .cta { display: inline-flex; align-items: center; gap: 8px; background: var(--red); color: var(--white); padding: 13px 22px; border-radius: var(--btn-radius, var(--r-pill)); font-family: var(--font-urdu); font-weight: 700; font-size: 14px; }

/* ═══ V. OPINION + NEWSLETTER ════════════════════════════════ */
/* Opinion (مقالاتِ رائے) — the busiest section after news: a featured op-ed
   lead, then an author-forward two-column grid. */
.opinion-band { padding: 40px 0; }
.op-shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--col-gap); align-items: start; }
/* A copy of the Opinion band (Studio ▸ Add a section ▸ same design) has no
   widget column (inc/widgets.php): its stories take the whole row. */
.tbp-sec--copy .op-shell { grid-template-columns: minmax(0, 1fr); }
/* Studio can set this section to ⅔ or ½ of its row, so it answers to its own
   width, not only the screen's. Below 700px of band (½ of a laptop row) the
   widget column goes under the stories; below 600px of stories (⅔) the lead's
   photo goes above its text. Full width never reaches either from 768px of
   screen up (the screen rules below already stack it under that), so the
   full-width section is laid out exactly as before at every size. */
.opinion-band, .opinion-section { container-type: inline-size; }
@container (max-width: 699px) { .opinion-band .op-shell { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 599px) { .opinion-section .op-lead { grid-template-columns: 1fr; } }
.op-lead { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--grid-gap); align-items: center; padding-bottom: 24px; margin-bottom: 10px; border-bottom: 1px solid var(--tbp-line); text-decoration: none; }
.op-lead .img { display: block; aspect-ratio: 16/10; border-radius: var(--r-card); border: var(--card-border); overflow: hidden; background: var(--paper-sunken) center/cover no-repeat; }
.op-lead .body { min-width: 0; }
.op-lead h3 { margin: 0; color: var(--ink-900); transition: color .15s; }
.op-lead .op-date { margin-bottom: 10px; }
.op-lead p { font-family: var(--font-urdu); font-weight: 400; font-size: 14.5px; line-height: 1.9; color: var(--ink-600); margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-lead .by { display: flex; align-items: baseline; gap: 10px; font-family: var(--font-urdu); font-size: 13px; }
.op-lead .by b { font-weight: 700; color: var(--ink-800); }
html.dark .op-lead h3 { color: var(--tbp-text); }
html.dark .op-lead .by b { color: var(--tbp-text-2); }
.opinion-grid { column-gap: var(--col-gap); }
.op-card { display: grid; grid-template-columns: var(--thumb-w) minmax(0, 1fr); gap: 14px; padding: 16px 0; align-items: start; text-decoration: none; }
.op-thumb { width: var(--thumb-w); aspect-ratio: var(--thumb-ratio); border-radius: var(--r-thumb); overflow: hidden; background: var(--paper-sunken) center/cover no-repeat; }
.op-txt { min-width: 0; }
.op-card h4 { margin: 0; color: var(--ink-900); transition: color .15s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-meta { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.op-card .author { font-family: var(--font-urdu); font-weight: 600; font-size: 12.5px; color: var(--red); }
html.dark .op-card h4 { color: var(--tbp-text); }
.newsletter-card { background: var(--paper-sunken); border: var(--frame-border); border-radius: var(--r-card); padding: 24px 22px 22px; text-align: center; position: relative; }
.newsletter-card::before { content: ""; display: block; width: 60px; height: 3px; background: var(--tbp-red); margin: 0 auto 14px; border-radius: 2px; }
.newsletter-card .ttl { font-family: var(--font-urdu); font-weight: 600; font-size: 15px; color: var(--ink-700); margin-bottom: 8px; }
.newsletter-card h2 { font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: calc(1.4 * var(--head-lh-x)); color: var(--ink-900); margin: 0 0 14px; letter-spacing: -0.01em; }
.newsletter-card p { font-family: var(--font-urdu); font-weight: 500; font-size: 13px; line-height: 1.7; color: var(--ink-600); margin: 0 0 18px; }
.newsletter-card input { width: 100%; padding: 12px 16px; background: var(--white); border: 1px solid var(--tbp-line-2); border-radius: var(--r-pill); font-family: var(--font-urdu); font-size: 14px; color: var(--ink-800); margin-bottom: 10px; box-sizing: border-box; }
.newsletter-card button { width: 100%; padding: 12px 16px; background: var(--surface-inverse); color: var(--on-inverse); border: 0; border-radius: var(--btn-radius, var(--r-pill)); font-family: var(--font-urdu); font-weight: 700; font-size: 14px; cursor: pointer; }
.newsletter-card button:hover { background: var(--tbp-red); }
.newsletter-card .privacy { margin-top: 12px; font-family: var(--font-urdu); font-size: 11px; color: var(--ink-500); line-height: 1.6; }
.newsletter-card .privacy a { color: var(--tbp-red); }
html.dark .newsletter-card { background: var(--paper-sunken); }
html.dark .newsletter-card h2, html.dark .newsletter-card .ttl { color: var(--tbp-text); }
/* Standalone widget zone (e.g. homepage bottom strip) — center the card(s) */
/* .tbp-wstack lives in app.css, not here: the article-rail zone renders on
   single posts, which never load this stylesheet. */
/* WhatsApp-join widget (a swap-in type for the newsletter card slot) */
html.dark .newsletter-card p { color: var(--tbp-text-2); }
html.dark .newsletter-card input { background: #0a0a0a; border-color: var(--tbp-line-2); color: var(--tbp-text); }
/* Button base is background:var(--ink-950) — inverts to #fff in dark mode → white
   text on a white button (invisible). Use the brand red CTA on dark instead. */
html.dark .newsletter-card button { background: var(--red); color: #fff; }
html.dark .newsletter-card button:hover { background: var(--red-lift); }

/* ═══ VI. PRESS / DESK + AD ══════════════════════════════════ */
.press-band { padding: 36px 0 44px; }
.press-shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--col-gap); }
.press-main { background: transparent; padding: 0; }
.press-main .secbar { margin-bottom: 18px; }
.press-lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--grid-gap); align-items: stretch; padding-bottom: 18px; border-bottom: 1px solid var(--tbp-line); margin-bottom: 4px; }
.press-lead > * { min-width: 0; }
.press-lead .img { width: 100%; height: auto; aspect-ratio: 16/10; border-radius: var(--r-card); border: var(--card-border); background: linear-gradient(135deg, var(--ink-400), var(--ink-700)); position: relative; }
.press-lead .img .photo-meta { position: absolute; bottom: 10px; inset-inline-start: 10px; }
.press-lead .body { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.press-lead h3 { margin: 0; color: var(--ink-900); }
.press-lead p { font-family: var(--font-urdu); font-weight: 500; font-size: 14px; line-height: 1.75; color: var(--ink-600); margin: 0; }
.press-lead .meta { display: flex; gap: 10px; align-items: center; font-family: var(--font-urdu); font-size: 12px; color: var(--ink-500); }
.press-list .item { display: grid; grid-template-columns: var(--thumb-w) minmax(0, 1fr); gap: 18px; padding: 14px 0; align-items: center; }
.press-list .item .img { width: var(--thumb-w); aspect-ratio: var(--thumb-ratio); border-radius: var(--r-thumb); background: linear-gradient(135deg, var(--ink-300), var(--ink-600)); }
.press-list .item h4 { margin: 0; color: var(--ink-900); }
/* The World desk aside is a widget zone (World desk — side column); with nothing in it the list takes the row. */
.press-shell--solo { grid-template-columns: minmax(0, 1fr); }

/* ═══ VII. SECTIONS ROW ══════════════════════════════════════ */
/* No band-level top rule — each column's secbar already draws one; the doubled
   hairlines read as an empty dead strip (worst in dark mode). */
.sections-band { padding: 10px 0 44px; }
.sec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--grid-gap); }
.sec-card { background: transparent; padding: 0; display: flex; flex-direction: column; }
/* Header: red bar + title, "تمام →" on the far side — no full-width rule. */
.sec-card .secbar { margin-bottom: 16px; border-top: 0; padding-top: 0; gap: 8px; }
.sec-card .secbar h2 { display: inline-flex; align-items: center; gap: 9px; }
.sec-card .secbar h2::before { display: var(--sec-tick); content: ""; width: 4px; height: 19px; border-radius: 1px; background: var(--tbp-red); flex: none; }
.sec-card .feature .img { aspect-ratio: 16/10; border-radius: var(--r-card); border: var(--card-border); background: linear-gradient(135deg, var(--ink-200), var(--ink-500)); margin-bottom: 14px; }
.sec-card .feature h3 { margin: 0; color: var(--ink-900); }
/* Lists stretch: a desk with fewer stories spreads its rows so all four
   columns in a row end flush — no void under a short desk. */
.sec-card .list { flex: 1; display: flex; flex-direction: column; }
.sec-card .list .li { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding: 11px 0; border-top: 1px solid var(--tbp-line); }
.sec-card .list .li:first-child { border-top: 0; }
.sec-card .list .li h4 { margin: 0; color: var(--ink-800); }

/* ═══ CUSTOM BLOCKS (inc/blocks.php) ════════════════════════════
   The block wrappers used to carry their spacing inline (margin:32px 0), which
   beat the rhythm reset above; on ordinary pages they keep it here. */
.tbp-blk { margin-block: 32px; }
/* Custom section — List: a picture beside every story, the rail's shape (it
   used to print label, headline and date with no picture at all). Style: Grid
   (data-cols-style="card") puts the picture on top instead. */
.tbp-blk-list .li { display: grid; grid-template-columns: var(--thumb-w) minmax(0, 1fr); column-gap: var(--list-gap); align-items: start; padding-block: var(--list-pad); }
.tbp-blk-list .li .thumb { grid-row: 1 / span 3; width: var(--thumb-w); aspect-ratio: var(--thumb-ratio); border-radius: var(--r-thumb); background-size: cover; background-position: center; }
.tbp-blk-list .li > :not(.thumb) { grid-column: 2; min-width: 0; }
.tbp-blk-list .li h4 { margin: 0; color: var(--ink-900); }
.tbp-blk-list .li a:hover h4 { color: var(--red); }
.tbp-blk-list [data-cols-style="card"] .li { grid-template-columns: minmax(0, 1fr); }
.tbp-blk-list [data-cols-style="card"] .li .thumb { grid-row: auto; width: 100%; margin-block-end: var(--list-gap); }
.tbp-blk-list [data-cols-style="card"] .li > :not(.thumb) { grid-column: 1; }
.tbp-blk-trending { border-top: 0; padding: 8px 0; }
.tbp-grid { display: grid; gap: var(--grid-gap); }
.tbp-grid-card .img { aspect-ratio: 16/10; border-radius: var(--r-card); border: var(--card-border); background-size: cover; }
.tbp-grid-card .tbp-card-cat { margin-top: 8px; }
.sec-card .feature .feat-date { margin-bottom: 12px; }
.tbp-grid-card h3 { margin: 0; color: var(--ink-900); }
html.dark .tbp-grid-card h3 { color: var(--tbp-text); }

/* ═══ FRONT-PAGE TWEAKS (data attrs on <html>) ═══════════════ */
/* 1 · accent recolor */
html[data-accent="indigo"] { --tbp-red:#2840c0; --tbp-red-d:#1f37a8; --tbp-blue:#6675e0; }
html[data-accent="pine"]   { --tbp-red:#0e7a4f; --tbp-red-d:#0a5e3c; --tbp-blue:#3f9b6f; }
html[data-accent="ink"]    { --tbp-red:#2f2f2f; --tbp-red-d:#101010; --tbp-blue:#7a7a7a; }
html.dark[data-accent="ink"] { --tbp-red:#c8c8c8; --tbp-red-d:#9a9a9a; --tbp-blue:#7a7a7a; }
/* ═══ STYLE MODES — each mode is a token preset and nothing else ═══════
   data-voice: modern | nastaliq   (the headline face)
   data-arch : standard | broadsheet (corners, surfaces, rules, grid gap)
   A mode may only set custom properties here. Components read the tokens,
   so every section gets the same treatment; no mode reaches into one
   component's rules. `standard` and `modern` are the token defaults. */
html[data-voice="nastaliq"] { --font-head: var(--font-urdu-disp); --font-head-sans: var(--font-urdu-disp); --head-lh-x: 1.35; }
html[data-arch="broadsheet"] { --r-card: 0; --r-thumb: 0; --r-pill: 0; --card-border: 1px solid var(--tbp-line-2); --frame-border: 1px solid var(--tbp-line-2); --sec-rule: 2px solid var(--ink-900); --sec-rule-pad: 10px; --sec-tick: none; --grid-gap: 16px; --tbp-paper: #f1ede2; --tbp-card: #fbf9f3; --tbp-card-2: #f3efe4; }
html.dark[data-arch="broadsheet"] { --tbp-paper: #0a0a0a; --tbp-card: #141414; --tbp-card-2: #161616; --sec-rule: 2px solid var(--tbp-text); }

/* ═══ Responsive — three breakpoints, every section at each ═══════════
   --bp-lg 1024px · --bp-md 768px · --bp-sm 480px (tokens.css). Nothing in
   this sheet queries any other width. lg: side columns narrow; md: every
   two-column layout (lead + list, content + sidebar) stacks; sm: single
   column, card grids may keep two when a card stays ≥160px. */
@media (max-width: 1024px) {
  .hero .hgrid { grid-template-columns: minmax(0, 1fr) 260px; }
  .video-carousel { grid-auto-columns: 148px; }
  .car-arrow { top: 136px; }
  .lens-rcard { flex-basis: 240px; }
  .trending { flex-basis: 300px; }
  /* min-height transfers through aspect-ratio into a MIN-WIDTH: at 800px the
     21/8 hero wanted 340px of height and so 892px of width, and the page
     scrolled sideways. Below lg the ratio alone sizes it. */
  .spr-hero { min-height: 0; }
  .spr-hero .spr-txt { bottom: 120px; }
  .spr-card { margin: -100px 24px 0; }
  .feature-split .left, .feature-split .right { padding: 18px 20px; }
  .ed-shell { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .iv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iv-grid[data-cols] { --cols: 2; } /* Studio's count is for wide screens; the cards are heavy */
  .op-shell { grid-template-columns: minmax(0, 1fr) 280px; }
  .press-shell { grid-template-columns: minmax(0, 1fr) 280px; }
  .sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbp-gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .hero .hgrid { grid-template-columns: 1fr; gap: var(--grid-gap); }
  .dossier .d-img { width: 56px; height: 56px; }
  .dossier { width: 68px; }
  .dos-arrow { display: none !important; }
  .dossier-row { justify-content: flex-start; }
  .video-carousel { grid-auto-columns: 140px; }
  .car-arrow { top: 128px; }
  .lens-rcard { flex-basis: 220px; }
  /* .tr-grid is FLEX (not grid): stack the columns, and clear .trending's
     flex-basis — in column direction it would become a forced HEIGHT while
     the feature stack collapsed to 0 width (invisible on phones). */
  .tr-grid { flex-direction: column; align-items: stretch; }
  .trending { flex: 0 0 auto; }
  .feature-split { grid-template-columns: 1fr; }
  .feature-split .left { border-inline-start: 0; border-top: 1px solid var(--tbp-line); }
  .spr-hero { aspect-ratio: auto; height: 300px; }
  .spr-hero .spr-txt { max-width: 86%; bottom: 130px; }
  .spr-card { grid-template-columns: 1fr; gap: var(--grid-gap); margin: -90px 14px 0; }
  /* The heavy card grids become swipe rails (scroll-snap) instead of tall
     stacks — same breadth, a fraction of the vertical scroll. RTL-native. */
  .iv-grid, .iv-grid[data-cols] { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; gap: var(--rail-gap); column-gap: var(--rail-gap); overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 6px; scrollbar-width: thin; }
  .iv-grid > * { scroll-snap-align: start; }
  .ed-shell { grid-template-columns: 1fr; gap: var(--grid-gap); }
  .invest-grid { grid-template-columns: 1fr; }
  .invest .img { display: none; }
  .op-shell { grid-template-columns: 1fr; }
  /* .op-lead is `minmax(0, 1fr) 300px` with the IMAGE in the flexible track:
     on a phone the text column took almost everything and the photograph
     was squeezed to a sliver. */
  .op-lead { grid-template-columns: 1fr; }
  .press-shell { grid-template-columns: 1fr; }
  .press-lead { grid-template-columns: 1fr; }
  .sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbp-gallery { grid-template-columns: repeat(2, 1fr); }
  .tbp-ms { grid-template-columns: 1fr; }
  .tbp-ms-list { max-height: none; }
}
@media (max-width: 480px) {
  .hero .feat-band { padding: 14px 18px; min-height: 0; }
  .video-carousel { grid-auto-columns: 132px; }
  .car-arrow { top: 121px; }
  .lens-rcard { flex-basis: 76%; }
  .tr-item { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
  .tr-item .n { font-size: 28px; }
  .feature-split .left, .feature-split .right { padding: 16px; }
  .spr-hero { height: 240px; }
  .spr-hero .spr-txt { bottom: 96px; }
  .spr-card { margin: -60px 8px 0; padding: 20px 18px 22px; }
  .ed-lead { padding: 22px 18px 20px; }
  .ed-img { margin: -22px -18px 18px; height: 200px; }
  .invest-stats { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: 1fr; }
  .tbp-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ═══ XII. STORY READER — rebuilt 2026-06-26; styles moved to
   assets/story-reader.css. The old .sr-* rules were removed: they collided
   with the new component (e.g. old .sr-cat{bottom:14px} + new .sr-cat{top:24px}
   stretched the category pill to the full card height). ═══ */

/* ── Lens rail (homepage photojournalism section) ─────────────────────── */
.lens-band { margin: 8px 0; }
.lens-rail { display: flex; gap: var(--rail-gap); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.lens-rail::-webkit-scrollbar { display: none; }
.lens-rcard { flex: 0 0 264px; scroll-snap-align: start; text-decoration: none; color: inherit; }
.lr-media { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r-card); border: var(--card-border); background: var(--ink-800) center / cover no-repeat; overflow: hidden; }
.lr-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.4)); }
.lr-cam { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.42); border-radius: var(--r-thumb); }
.lr-cam svg { width: 16px; height: 16px; }
.lr-count { position: absolute; inset-block-end: 10px; inset-inline-end: 10px; z-index: 2; background: var(--red); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); }
.lr-title { color: var(--ink-900); margin: 0; transition: color .15s; }
html.dark .lr-title { color: var(--tbp-text); }
html.dark .lr-media { background-color: var(--tbp-card); }

/* ═══ SECTION COLUMNS — Studio ▸ Pages ▸ <section> ▸ Columns ════════════
   One grid for every list and card grid on the page. The template prints
   data-cols="N" on the container that holds the items (inc/section-columns.php)
   and nothing else per section: --cols carries N into the one rule below.
   Dividers sit ABOVE items and the first row drops them, so a partial last
   row never leaves a stray line, and nothing runs vertically. A card grid
   (data-cols-kind="grid") has no dividers and a --grid-gap between rows.
   Caps (tokens.css --bp-*, each max-width is inclusive — "at and below"):
   at lg lists 2 / grids 4; at md lists 1 / grids 2; at sm lists 1 / grids as
   many --card-min cards as fit. Each cap names [data-cols] as well as the
   kind, so it is never less specific than the cap above it. */
[data-cols] { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: 0; align-items: start; }
[data-cols-kind="grid"] { row-gap: var(--grid-gap); }
[data-cols="1"] { --cols: 1; } [data-cols="2"] { --cols: 2; } [data-cols="3"] { --cols: 3; } [data-cols="4"] { --cols: 4; } [data-cols="5"] { --cols: 5; } [data-cols="6"] { --cols: 6; }
[data-cols] > * { min-width: 0; border-top: 1px solid var(--tbp-line); border-bottom: 0; }
[data-cols="1"] > :nth-child(-n+1), [data-cols="2"] > :nth-child(-n+2), [data-cols="3"] > :nth-child(-n+3), [data-cols="4"] > :nth-child(-n+4), [data-cols="5"] > :nth-child(-n+5), [data-cols="6"] > :nth-child(-n+6) { border-top: 0; }
[data-cols-kind="grid"] > * { border-top: 0; }
/* A narrow list past one column drops the thumbnail beside each headline
   (inc/section-columns.php marks which): the headline takes the whole item.
   Wide screens only — at md every list is one column and keeps its thumbnail. */
@media (min-width: 769px) {
  .tbp-home-main [data-cols-thumbs="hide"][data-cols] > * { grid-template-columns: minmax(0, 1fr); }
  .tbp-home-main [data-cols-thumbs="hide"][data-cols] > * > :is(.rail-thumb, .img, .thumb, .ed-thumb) { display: none; }
}
@media (max-width: 1024px) {
  [data-cols="3"]:not([data-cols-kind]), [data-cols="4"]:not([data-cols-kind]), [data-cols="5"]:not([data-cols-kind]), [data-cols="6"]:not([data-cols-kind]) { --cols: 2; }
  [data-cols-kind="grid"][data-cols="5"], [data-cols-kind="grid"][data-cols="6"] { --cols: 4; }
  [data-cols="3"]:not([data-cols-kind]) > :nth-child(n+3), [data-cols="4"]:not([data-cols-kind]) > :nth-child(n+3), [data-cols="5"]:not([data-cols-kind]) > :nth-child(n+3), [data-cols="6"]:not([data-cols-kind]) > :nth-child(n+3) { border-top: 1px solid var(--tbp-line); }
}
@media (max-width: 768px) {
  [data-cols]:not([data-cols-kind]) { --cols: 1; }
  [data-cols-kind="grid"][data-cols] { --cols: 2; }
  [data-cols]:not([data-cols-kind]) > :nth-child(n+2) { border-top: 1px solid var(--tbp-line); }
}
@media (max-width: 480px) {
  [data-cols-kind="grid"] { grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); }
}

/* List → Grid (Studio ▸ Pages ▸ <section> ▸ Style): the same items as cards,
   picture on top, then label, title, date. The container is already a card
   grid (data-cols-kind="grid": row gap, no dividers, the card caps); this
   turns each item over. :root keeps it above each item's own two-column
   template and thumbnail size (.feature-split .left .story .img is 0,4,0). */
:root [data-cols-style="card"][data-cols] > * { grid-template-columns: minmax(0, 1fr); align-items: start; padding-block: 0; }
:root [data-cols-style="card"][data-cols] > * > :is(.rail-thumb, .img, .thumb, .ed-thumb, .op-thumb) { width: 100%; aspect-ratio: var(--card-img-ratio); order: -1; }

/* ── Rails: Cards visible + Display (Studio ▸ Pages ▸ Videos / Lens) ──────
   Unset, a rail keeps its shipped px-sized cards and swipes. data-visible="N"
   sizes a card to N across the container; data-display="grid" turns the rail
   into a static grid of the same width and hides the arrows. */
[data-visible="3"] { --vis: 3; } [data-visible="4"] { --vis: 4; } [data-visible="5"] { --vis: 5; } [data-visible="6"] { --vis: 6; }
.video-carousel[data-visible] { grid-auto-columns: calc((100% - (var(--vis) - 1) * var(--rail-gap)) / var(--vis)); }
.lens-rail[data-visible] .lens-rcard { flex-basis: calc((100% - (var(--vis) - 1) * var(--rail-gap)) / var(--vis)); }
[data-display="grid"] { overflow: visible; scroll-snap-type: none; padding-bottom: 0; }
.video-carousel[data-display="grid"] { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(var(--vis, 4), minmax(0, 1fr)); }
.lens-rail[data-display="grid"] { display: grid; grid-template-columns: repeat(var(--vis, 4), minmax(0, 1fr)); }
.lens-rail[data-display="grid"] .lens-rcard { flex: none; }
.carousel-wrap:has(> [data-display="grid"]) .car-arrow { display: none; }
@media (max-width: 1024px) {
  [data-visible="5"], [data-visible="6"] { --vis: 4; }
}
@media (max-width: 768px) {
  [data-visible] { --vis: 3; }
  [data-display="grid"] { --vis: 2; }
}
@media (max-width: 480px) {
  [data-visible] { --vis: 2; }
  [data-display="grid"] { grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); }
}

/* ═══ CARD TITLES — clamp, hover, photo titles ═══════════════════════════
   What staging carried as Studio Custom CSS ("Headlines: max 2 lines" and
   "one hover style everywhere"), now the theme's default for every card:

   - A card title stops at --title-lines (2) with an ellipsis.
   - Hovering a card, or tabbing into it, turns its title --card-hover (the
     accent) with no underline. The sections carried their own hovers —
     red, a darker red, the rail's grey-to-black, none on Editor's Pick, the
     desk list or the grid cards — and html.dark title colours declared
     later at equal specificity cancelled several in dark mode; :root lifts
     this above both.
   - A title on a photograph stays white and takes a red underline instead.
   - The rail no longer slides on hover. */
:root :is(.hero .rail-item, .tr-item, .video-card, .spr-item, .spr-feat, .ed-item, .ed-lead-link, .op-lead, .op-card, .lens-rcard, .press-lead, .press-list .item, .sec-card .feature, .sec-card .list .li, .tbp-blk-list .li, .tbp-grid-card, .feature-split .left .story, .feature-split .right, .report-card, .reports-lead) :is(h3, h4, .rail-h, .vc-title, .t, .lr-title, .ttl) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--title-lines); line-clamp: var(--title-lines); overflow: hidden; transition: color .15s ease; }
:root :is(.hero .rail-item, .tr-item, .video-card, .spr-item, .spr-feat, .ed-item, .ed-lead-link, .op-lead, .op-card, .lens-rcard, .press-lead, .press-list .item, .sec-card .feature, .sec-card .list .li, .tbp-blk-list .li, .tbp-grid-card, .feature-split .left .story, .feature-split .right, .report-card, .reports-lead):is(:hover, :focus-within) :is(h3, h4, .rail-h, .vc-title, .t, .lr-title, .ttl) { color: var(--card-hover); text-decoration: none; }
:root :is(.spr-hero h3, .feature-hero .label, .iv-card .quote) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--title-lines); line-clamp: var(--title-lines); overflow: hidden; }
:root :is(.spr-hero, .feature-hero, .iv-card):is(:hover, :focus-within) :is(h3, .label, .quote) { color: var(--white); text-decoration: underline; text-decoration-color: var(--card-hover); text-decoration-thickness: 3px; text-underline-offset: .35em; }
