/* ---------- Dossier page (dossier.html): a long-running matter across its stories ----------
 * Builds on story.css (crumbs, status, section heads, source marks, method note) and the metric
 * blocks of metrics.css. Here: the description and tags, the figures with the 14-day activity,
 * the stories of the dossier, the background articles, and the source ranking. */

.ds-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 24px; align-items: start; }
.ds-intro { display: grid; gap: 14px; min-width: 0; }
.ds-intro h1 { margin: 0; font-size: clamp(28px, 3.4vw, 42px); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.ds-description { max-width: 70ch; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.ds-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ds-tags a { display: inline-flex; padding: 4px 9px; border: 1px solid var(--line); color: var(--text); font-size: 12px; }
.ds-tags a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.ds-editor { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.ds-editor strong { color: var(--text); font-weight: 600; }
.ds-head .mx-stats dt { letter-spacing: .02em; }
.ds-head .mx-columns { margin-top: 4px; }
.ds-activity-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 14px 0 8px; }

/* The stories of the dossier, latest activity first */
.ds-stories { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.ds-story { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ds-story:last-child { border-bottom: 0; }
.ds-story-main { display: grid; gap: 6px; min-width: 0; }
.ds-story-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; color: var(--muted); font-size: 9px; letter-spacing: .05em; }
.ds-story-kicker .st-status { padding: 1px 5px; }
.ds-story-kicker .is-closed { border-color: var(--line); color: var(--muted); }
.ds-story-title { display: -webkit-box; overflow: hidden; color: var(--text); font-family: var(--font-heading); font-size: 17px; font-weight: 600; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ds-story-title:hover { color: var(--color-primary); }
.ds-story .mx-statline { margin-top: 2px; }
.ds-story-sources { display: flex; align-items: flex-start; gap: 3px; padding-top: 18px; }
.ds-story-sources .more { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 9px; }

/* Background articles (secondary links) with the reason of the link */
.ds-background { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.ds-background li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ds-background li:last-child { border-bottom: 0; }
.ds-background li > div { display: grid; gap: 4px; min-width: 0; }
.ds-background a { display: -webkit-box; overflow: hidden; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ds-background a:hover { color: var(--color-primary); }
.ds-background p { margin: 0; }
.ds-reason { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* Sources of the dossier: ranked bars of one hue, largest first */
.ds-rank { display: grid; gap: 9px; margin: 8px 0 0; }
.ds-rank div { display: grid; grid-template-columns: minmax(0, 124px) minmax(0, 1fr) 24px; gap: 10px; align-items: center; }
.ds-rank dt { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; }
.ds-rank dt .source-avatar { flex: none; }
.ds-rank dt > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-rank dd { display: contents; }
.ds-rank .mx-meter { height: 8px; border-radius: 4px; }
.ds-rank .mx-meter > i { width: calc(var(--n) / var(--max) * 100%); border-radius: 4px; }
.ds-rank .mx-value { text-align: right; }

.ds-main { display: grid; gap: 16px; min-width: 0; }
.ds-main > section { padding: 16px 18px 6px; }

@media (max-width: 980px) {
  .ds-head { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .ds-story { grid-template-columns: minmax(0, 1fr); }
  .ds-story-sources { padding-top: 0; }
}
