/* DISPATCH TERMINAL FINISH 1.6.5 — Capital edition only.
 * Additive and reversible. Do not replace brand palette, source templates or art.
 * Matches semantic finish rules in React app/globals.css.
 */
html[data-publication="capital"] {
  --dispatch-finish-rule: rgba(228, 220, 192, .19);
  --dispatch-finish-gold: #e2b04a;
  scroll-behavior: smooth;
}
html[data-publication="capital"] :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--dispatch-finish-gold);
  outline-offset: 3px;
}
html[data-publication="capital"] :is(h1, h2, h3) { text-wrap: balance; }
html[data-publication="capital"] :is(p, blockquote) { text-wrap: pretty; }
html[data-publication="capital"] img { vertical-align: middle; }
html[data-publication="capital"] :is(.terminal-page-grid, .upper-news-grid, .upper-main, .dispatch-layout, .thread-shell) { min-width: 0; }

/* The commissioned Apollo artwork remains the cover. Add depth, not a new crop. */
html[data-publication="capital"] .apollo-hero { isolation: isolate; overflow: hidden; }
html[data-publication="capital"] .apollo-hero .encore-art { display: block; object-fit: cover; }
html[data-publication="capital"] .apollo-hero .encore-copy { position: relative; z-index: 2; }
html[data-publication="capital"] .capital-curated-dispatches .dispatches-head { border-bottom: 1px solid var(--dispatch-finish-rule); }
html[data-publication="capital"] .capital-curated-dispatches :is(.dispatch-lead, .dispatch-mini, .dispatch-brief) { min-width: 0; }
html[data-publication="capital"] .dispatch-lead-art { position: relative; overflow: hidden; }
html[data-publication="capital"] .dispatch-lead-art img { width: 100%; height: 100%; object-fit: cover; }
html[data-publication="capital"] .dispatch-story-thumb { flex-shrink: 0; object-fit: cover; }
html[data-publication="capital"] .dispatch-mini:hover .dispatch-story-thumb { filter: contrast(1.08) saturate(1.03); }
html[data-publication="capital"] .dispatch-brief-text { text-wrap: balance; }

/* Quiet, modern ticker edges. Keyboard focus and pointer hover pause its motion. */
html[data-publication="capital"] .capital-news-ticker .ticker-window { min-width: 0; mask-image: linear-gradient(90deg, transparent 0, #000 1.25%, #000 98.75%, transparent 100%); }
html[data-publication="capital"] .capital-news-ticker .ticker-window:hover .ticker-flow,
html[data-publication="capital"] .capital-news-ticker .ticker-window:focus-within .ticker-flow {
  animation-play-state: paused;
}
html[data-publication="capital"] .capital-news-ticker .market-reading { font-variant-numeric: tabular-nums; }

/* Retain independently scrolling Wire; make scanning and controls more precise. */
html[data-publication="capital"] .old-wire { min-width: 0; }
html[data-publication="capital"] .old-wire .wire-list {
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(226,176,74,.42) transparent;
}
html[data-publication="capital"] .old-wire .wire-item { transition: background-color .22s ease, box-shadow .22s ease; }
html[data-publication="capital"] .old-wire .wire-item:hover,
html[data-publication="capital"] .old-wire .wire-item:focus-within { box-shadow: inset 2px 0 var(--dispatch-finish-gold); }
html[data-publication="capital"] .wire-motion-toggle { min-width: 36px; min-height: 36px; }

/* The Tape: a premium quote readout without touching the illustrative values. */
html[data-publication="capital"] .weekly-terminal { isolation: isolate; }
html[data-publication="capital"] .weekly-terminal .tape-quote { position: relative; isolation: isolate; }
html[data-publication="capital"] .weekly-terminal .tape-quote::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  inset: -10px -12px; border: 1px solid rgba(226,176,74,.23);
  background: radial-gradient(ellipse at 72% 80%, rgba(226,176,74,.11), transparent 65%);
}
html[data-publication="capital"] .weekly-terminal .tape-index {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.055em;
  text-shadow: 0 0 24px rgba(226,176,74,.12);
}
html[data-publication="capital"] .weekly-terminal .weekly-plot { min-width: 0; }
html[data-publication="capital"] .tape-partner:focus-visible { outline-offset: -4px; }

/* The Thread is the intentional white editorial pivot, not an extra terminal card. */
html[data-publication="capital"] .thread-shell { border-top: 1px solid rgba(255,255,255,.88); }
html[data-publication="capital"] .thread-shell :is(.cluster, .thread-story-3, .thread-story-4, .thread-story-6, .thread-story-7, .thread-story-8) { min-width: 0; }
html[data-publication="capital"] .thread-shell .cover-img { overflow: hidden; }
html[data-publication="capital"] .thread-shell .cover-img img { object-fit: cover; }
html[data-publication="capital"] .thread-shell :is(.cluster-copy p, .cluster-intro p) { max-width: 72ch; }
html[data-publication="capital"] .week-edition { min-width: 0; }

@media (max-width: 1024px) {
  html[data-publication="capital"] .dispatch-layout { min-width: 0; }
  html[data-publication="capital"] .old-wire .wire-list { max-height: min(70vh, 690px); }
}
@media (max-width: 720px) {
  html[data-publication="capital"] .capital-news-ticker .ticker-window { mask-image: none; }
  html[data-publication="capital"] .weekly-terminal .tape-quote::before { inset: -5px; }
  html[data-publication="capital"] .dispatch-mini .dispatch-story-thumb { width: clamp(66px, 19vw, 98px); height: auto; aspect-ratio: 1 / 1; }
  html[data-publication="capital"] .old-wire .wire-list { max-height: 520px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-publication="capital"] { scroll-behavior: auto; }
  html[data-publication="capital"] :is(.ticker-flow, .capital-claude-square, .capital-network-icon img) { animation: none !important; }
  html[data-publication="capital"] :is(.thread-reveal, .cover-img img, .dispatch-story-thumb) { transition: none !important; }
  html[data-publication="capital"] .thread-reveal { opacity: 1 !important; transform: none !important; }
}
