/* ============================================================
   Dossier timeline — tag-archive "follow the whole story" page.
   Enqueued on tag archives only. Depends on tokens.css + app.css.
   ============================================================ */

.dossier-page { max-width: 880px; margin: 0 auto; padding: 0 28px; }

/* ── Header ─────────────────────────────────────────────── */
.dossier-hd { padding-bottom: 22px; border-bottom: 1px solid var(--tbp-line); margin-bottom: 8px; }
.dossier-kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--red); margin-bottom: 14px; }
.dossier-kicker .bn-dot { background: var(--red); }
.dossier-title { font-family: var(--font-urdu); font-weight: 700; font-size: clamp(30px, 4vw, 44px); line-height: 1.35; color: var(--ink-900); margin: 0 0 10px; }
/* Living-investigation signal — this series is still being reported. */
.dossier-live-tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-urdu); font-weight: 700; font-size: 12px; color: var(--tbp-live); background: color-mix(in srgb, var(--tbp-live) 10%, transparent); padding: 4px 11px; border-radius: 999px; margin-bottom: 14px; }
.dossier-live-tag .bn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tbp-live); animation: dossierPulse 1.8s ease-in-out infinite; }
@keyframes dossierPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.dossier-stand { font-family: var(--font-urdu); font-size: 16.5px; line-height: 1.9; color: var(--ink-600); max-width: 60ch; margin: 0 0 16px; }
.dossier-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--font-urdu); font-size: 13.5px; color: var(--ink-500); }
.dossier-stats .ds b { color: var(--red); font-size: 15px; }
.dossier-stats time { font-family: var(--font-mono); font-size: 12px; }
.dossier-stats .ds-sep { color: var(--tbp-line-2); }

/* ── Timeline (magazine cards) ──────────────────────────── */
.timeline { list-style: none; margin: 34px 0 0; padding: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 22px; padding-bottom: 40px; }
.tl-rail { position: relative; }
/* Center on the rail with a physical left + physical translateX so the 2px
   line and the 13px node land on the same axis in RTL (logical inset-inline
   anchors to the right edge and drifts them apart by different amounts). */
.tl-rail::before { content: ""; position: absolute; left: 50%; top: 8px; bottom: -40px; width: 2px; transform: translateX(-50%); background: var(--tbp-line-2); }
.tl-item:last-child .tl-rail::before { display: none; }
.tl-node { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); width: 13px; height: 13px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--tbp-paper); }
.tl-item.is-latest .tl-node { background: var(--tbp-live); box-shadow: 0 0 0 4px var(--tbp-paper), 0 0 0 6px color-mix(in srgb, var(--tbp-live) 35%, transparent); }

.tl-mag { min-width: 0; }
.tl-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-family: var(--font-urdu); font-size: 13px; color: var(--ink-500); }
.tl-meta time { font-family: var(--font-mono); font-size: 12px; color: var(--red); font-weight: 600; }
.tl-meta .tl-dot { color: var(--tbp-line-2); }
.tl-meta .tl-cat { color: var(--ink-600); }
.tl-latest { font-family: var(--font-urdu); font-weight: 700; font-size: 11px; color: #fff; background: var(--tbp-live); padding: 2px 9px; border-radius: 999px; }

.tl-mag-media { display: block; aspect-ratio: 7/4; border-radius: var(--r-card-lg); background: var(--ink-200) center/cover no-repeat; margin-bottom: 16px; transition: transform .25s ease, box-shadow .25s ease; }
.tl-mag-media:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.14); }

.tl-mag-ttl { display: block; font-family: var(--font-urdu); font-weight: 700; font-size: 25px; line-height: 1.5; color: var(--ink-900); text-decoration: none; }
.tl-item.is-latest .tl-mag-ttl { font-size: 30px; }
.tl-mag-ttl:hover { color: var(--red); }
.tl-mag-stand { font-family: var(--font-urdu); font-size: 16px; line-height: 1.95; color: var(--ink-600); margin: 12px 0 16px; max-width: 64ch; }
.tl-mag-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--tbp-line); }
.tl-byline { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-urdu); font-size: 13px; color: var(--ink-500); }
.tl-byline [dir="ltr"] { font-family: var(--font-mono); font-size: 11.5px; }
.tl-more { font-family: var(--font-urdu); font-weight: 700; font-size: 13.5px; color: var(--red); text-decoration: none; white-space: nowrap; }
.tl-more:hover { color: var(--red-strong); }

@media (max-width: 700px) {
  .dossier-page { padding: 0 18px; }
  .tl-item { grid-template-columns: 16px 1fr; gap: 14px; padding-bottom: 32px; }
  .tl-rail::before { bottom: -32px; }
  .tl-mag-ttl { font-size: 21px; }
  .tl-item.is-latest .tl-mag-ttl { font-size: 24px; }
  .tl-mag-stand { font-size: 15px; }
}

/* ── More dossiers — cross-link to the other series ─────── */
.dossier-more { margin-top: 14px; padding-top: 30px; border-top: 2px solid var(--ink-900); }
.dm-title { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-urdu); font-weight: 700; font-size: 20px; color: var(--ink-900); margin: 0 0 18px; }
.dm-title::before { content: ""; width: 4px; height: 19px; border-radius: 1px; background: var(--red); flex: none; }
.dm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 12px; }
.dm-card { display: flex; align-items: center; gap: 13px; padding: 10px 12px; border: 1px solid var(--tbp-line); border-radius: var(--r-card); text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.dm-card:hover { border-color: color-mix(in srgb, var(--red) 45%, var(--tbp-line)); box-shadow: 0 10px 26px rgba(0,0,0,.08); transform: translateY(-2px); }
.dm-img { width: 58px; height: 58px; border-radius: 10px; flex: none; background: var(--ink-200) center/cover no-repeat; }
.dm-body { min-width: 0; flex: 1; }
.dm-label { display: block; font-family: var(--font-urdu); font-weight: 700; font-size: 15.5px; line-height: 1.4; color: var(--ink-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-count { display: block; font-family: var(--font-urdu); font-size: 12px; color: var(--ink-500); margin-top: 3px; }
.dm-count b { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--red); }
.dm-go { font-size: 16px; color: var(--tbp-line-2); flex: none; transition: color .18s ease, transform .18s ease; }
.dm-card:hover .dm-go { color: var(--red); transform: translateX(-3px); }

/* ── View toggle (Timeline ⇄ Cards) ─────────────────────── */
.dossier-views { display: inline-flex; gap: 4px; margin: 18px 0 0; padding: 4px; background: var(--ink-100); border: 1px solid var(--tbp-line); border-radius: 999px; }
.dv-btn { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; cursor: pointer; padding: 7px 15px; border-radius: 999px; font-family: var(--font-urdu); font-weight: 600; font-size: 13px; color: var(--ink-500); transition: background .15s, color .15s, box-shadow .15s; }
.dv-btn svg { width: 16px; height: 16px; }
.dv-btn:hover { color: var(--ink-900); }
.dv-btn.is-active { background: var(--tbp-paper); color: var(--red); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ── Cards view (grid) — same markup, re-flowed via order ── */
.dossier-page.view-cards { max-width: 1140px; }
.view-cards .timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 24px; margin-top: 30px; }
.view-cards .tl-item { display: block; padding-bottom: 0; }
.view-cards .tl-rail { display: none; }
.view-cards .tl-mag { display: flex; flex-direction: column; height: 100%; background: var(--tbp-paper); border: 1px solid var(--tbp-line); border-radius: var(--r-card-lg); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.view-cards .tl-mag:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.12); }
.view-cards .tl-mag-media { order: 1; aspect-ratio: 16/9; border-radius: 0; margin: 0; }
.view-cards .tl-mag-media:hover { transform: none; box-shadow: none; }
.view-cards .tl-meta { order: 2; margin: 14px 16px 0; }
.view-cards .tl-mag-ttl,
.view-cards .tl-item.is-latest .tl-mag-ttl { order: 3; font-size: 19px; line-height: 1.5; margin: 10px 16px 0; direction: rtl; text-align: right; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.view-cards .tl-mag-stand { order: 4; font-size: 14px; line-height: 1.8; margin: 10px 16px 14px; direction: rtl; text-align: right; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.view-cards .tl-mag-foot { order: 5; margin: auto 16px 16px; padding-top: 14px; }
.view-cards .tl-more { white-space: nowrap; }

@media (max-width: 700px) {
  .view-cards .timeline { grid-template-columns: 1fr; gap: 22px; }
}

/* ── Compact view (Asharq-style dense rows) ─────────────── */
.view-compact .timeline { margin-top: 24px; }
.view-compact .tl-item { display: block; padding: 0; border-bottom: 1px solid var(--tbp-line); }
.view-compact .tl-item:last-child { border-bottom: 0; }
.view-compact .tl-rail { display: none; }
.view-compact .tl-mag { display: grid; grid-template-columns: 1fr 92px; column-gap: 16px; align-items: start; padding: 16px 0; }
.view-compact .tl-mag-media { grid-column: 2; grid-row: 1 / span 2; width: 92px; height: 92px; aspect-ratio: auto; border-radius: 10px; margin: 0; align-self: center; }
.view-compact .tl-mag-media:hover { transform: none; box-shadow: none; }
.view-compact .tl-meta { grid-column: 1; grid-row: 1; margin: 0 0 7px; }
.view-compact .tl-mag-ttl,
.view-compact .tl-item.is-latest .tl-mag-ttl { grid-column: 1; grid-row: 2; font-size: 17px; line-height: 1.55; margin: 0; direction: rtl; text-align: right; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.view-compact .tl-mag-stand { display: none; }
.view-compact .tl-mag-foot { display: none; }

@media (max-width: 700px) {
  .view-compact .tl-mag { grid-template-columns: 1fr 72px; column-gap: 12px; padding: 14px 0; }
  .view-compact .tl-mag-media { width: 72px; height: 72px; }
  .view-compact .tl-mag-ttl { font-size: 15.5px; }
}

/* Empty state — dossier tag with no posts yet (fallback instead of a blank page) */
.dossier-empty { padding: 44px 0 24px; text-align: center; }
.dossier-empty p { font-family: var(--font-urdu); font-size: 18px; line-height: 1.9; color: var(--ink-500); margin: 0 0 16px; }
.dossier-empty-link { font-family: var(--font-urdu); font-weight: 600; font-size: 14px; color: var(--red); text-decoration: none; }
.dossier-empty-link:hover { text-decoration: underline; }
