/* Crypto crime × BTC report (/research/crypto-crime-timeline/) on cw-system + cw-reading.
   Re-tokened from the page's former inline styles (white + orange). The interactive timeline keeps
   its markup and script; only colours, type and spacing moved to cw tokens.
   One exception to "IKB is the only accent": the BTC price line stays orange, because the report
   text and its legend name it (橙线). #e0561f is 3.64:1 on paper; graphics need 3:1. */

.rpt { --rpt-btc: #e0561f; }

/* A data report: the text column keeps the Chinese measure, while the timeline and the tables use
   the full width to the right of the rail. */
.rpt .cw-article-body { grid-column: 4 / -1; }
.rpt-body.cw-prose { max-width: none; }
.rpt-body > :where(p, ul, ol, blockquote, h3, h4) { max-width: var(--measure-zh); }
@media (max-width: 56rem) { .rpt .cw-article-body { grid-column: auto; } }

/* The report's first paragraph (research date + scope) reads as metadata. */
.rpt-body > p:first-child { color: var(--text-2); font-size: var(--fs-small); line-height: 1.8; }
.rpt-body h2 { padding-top: var(--sp-4); border-top: var(--bw) solid var(--line-strong); }
.rpt-body #executive-summary + ul {
  margin-top: var(--sp-4);
  padding: var(--sp-5) var(--sp-5) var(--sp-5) calc(var(--sp-5) + 1.2em);
  border-left: 2px solid var(--accent);
  background: var(--surface-raised);
}

/* Rail table of contents: desktop only (the rail is sticky there). */
.rpt-toc ol { display: grid; gap: var(--sp-2); margin: var(--sp-2) 0 0; padding: 0; list-style: none; font-size: var(--fs-small); line-height: 1.45; }
.rpt-toc a { color: var(--text-2); text-decoration: none; }
.rpt-toc a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 64rem) { .rpt-toc { display: none; } }

/* Utility classes the report markup uses. */
.rpt .text-small { font-size: var(--fs-small); }
.rpt .text-muted { color: var(--text-2); }
.rpt .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Interactive timeline ── */
#btc-legal-explorer-v2.timeline-component { width: 100%; margin: var(--sp-5) 0 var(--sp-7); color: var(--text); }
#btc-legal-explorer-v2 .viz-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
#btc-legal-explorer-v2 .viz-row { display: flex; flex-wrap: wrap; align-items: center; }
#btc-legal-explorer-v2 .btn {
  appearance: none;
  min-height: 2.25rem;
  margin: 0;
  padding: 0 var(--sp-3);
  border: var(--bw) solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
#btc-legal-explorer-v2 .btn:hover { background: var(--surface-raised); }
#btc-legal-explorer-v2 .timeline-range[aria-pressed="true"] { background: var(--text); color: var(--surface); }
#btc-legal-explorer-v2 .timeline-legend { gap: var(--sp-2) var(--sp-4); margin: 0 0 var(--sp-3); color: var(--text-2); }
#btc-legal-explorer-v2 .timeline-legend span { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
#btc-legal-explorer-v2 .legend-shape { display: inline-block; width: 0.7rem; height: 0.7rem; border: 1.5px solid currentColor; background: var(--surface); }
#btc-legal-explorer-v2 .legend-circle { border-radius: 50%; }
#btc-legal-explorer-v2 .legend-diamond { transform: rotate(45deg) scale(0.78); }
#btc-legal-explorer-v2 .legend-triangle {
  width: 0; height: 0;
  border-left: 0.42rem solid transparent; border-right: 0.42rem solid transparent;
  border-bottom: 0.75rem solid currentColor; border-top: 0;
  background: transparent;
}
#btc-legal-explorer-v2 .timeline-plot { position: relative; width: 100%; border-top: var(--bw) solid var(--line); border-bottom: var(--bw) solid var(--line); }
#btc-legal-explorer-v2 .timeline-svg { display: block; width: 100%; height: auto; overflow: visible; }
#btc-legal-explorer-v2 .timeline-grid,
#btc-legal-explorer-v2 .timeline-rule { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
#btc-legal-explorer-v2 .event-link .event-connector { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
#btc-legal-explorer-v2 .event-link .event-shape { fill: var(--surface); stroke: var(--text); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
#btc-legal-explorer-v2 .event-link:hover .event-shape,
#btc-legal-explorer-v2 .event-link:focus-visible .event-shape,
#btc-legal-explorer-v2 .event-link.is-selected .event-shape { fill: var(--accent); stroke: var(--accent); }
#btc-legal-explorer-v2 .event-link .avatar-text,
#btc-legal-explorer-v2 .event-link .event-label,
#btc-legal-explorer-v2 .price-label { fill: var(--text); font-family: var(--font-sans); }
#btc-legal-explorer-v2 .event-link:hover .avatar-text,
#btc-legal-explorer-v2 .event-link:focus-visible .avatar-text,
#btc-legal-explorer-v2 .event-link.is-selected .avatar-text { fill: var(--on-accent); }
#btc-legal-explorer-v2 .avatar-text,
#btc-legal-explorer-v2 .event-label { font-weight: 500; }
#btc-legal-explorer-v2 .axis-label { fill: var(--text-muted); font-family: var(--font-mono); }
#btc-legal-explorer-v2 .price-line { fill: none; stroke: var(--rpt-btc); stroke-width: 3; vector-effect: non-scaling-stroke; }
#btc-legal-explorer-v2 .price-end { fill: var(--rpt-btc); }
#btc-legal-explorer-v2 .tooltip { padding: var(--sp-2) var(--sp-3); background: var(--text); color: var(--surface); font-size: var(--fs-meta); line-height: 1.4; }
#btc-legal-explorer-v2 .timeline-tooltip {
  position: absolute;
  z-index: 3;
  max-width: min(23rem, calc(100% - 1rem));
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 0.8rem));
}
#btc-legal-explorer-v2 .timeline-detail {
  min-height: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-bottom: var(--bw) solid var(--line);
}
#btc-legal-explorer-v2 .timeline-detail a { color: var(--accent); font-weight: 500; }

@media (max-width: 43.75rem) {
  #btc-legal-explorer-v2 .timeline-tooltip { transform: translate(-50%, calc(-100% - 0.45rem)); }
}

@media print {
  @page { size: A4; margin: 14mm; }
  .cw-header, .cw-footer, .cw-skip, .cw-article-rail, .timeline-controls { display: none !important; }
  .cw-article-layout { display: block; border-top: 0; }
  .rpt-body div:has(> table) { overflow: visible; }
  .rpt-body table { font-size: 8pt; }
}
