/* Standing rules ticker: crawl on desktop, one rule at a time on phones and reduced motion. */
.ticker {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: stretch;
  min-height: 52px; background: var(--newsprint-deep); border-bottom: 1px solid var(--ink); overflow: hidden;
}
.tk-label {
  margin: 0; padding: 0 8px; display: flex; flex-direction: column; justify-content: center;
  background: var(--ledger-red); color: var(--newsprint); font-size: 0.75rem; line-height: 1.25; letter-spacing: 0.08em;
}
.tk-label span:last-child { display: inline; }
.tk-btn {
  min-width: 44px; min-height: 44px; padding: 0 6px; background: transparent; border: 0; border-right: 1px solid var(--rule);
  font-weight: 700; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.tk-win { position: relative; overflow: hidden; display: flex; align-items: center; min-width: 0; padding: 4px 10px; }
.tk-list { display: flex; font-style: italic; font-size: 0.875rem; line-height: 1.3; }
.tk-list li { white-space: nowrap; padding-right: 28px; }
.tk-list b { font-weight: 700; }
.tk-rail { display: flex; width: max-content; }
.tk-rail .tk-list { flex: none; }
.tk-rail .tk-list li { padding-right: 28px; }
.tk-rail .tk-list li::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 28px; vertical-align: 0.12em; background: var(--ledger-red); }
.tk-rail { animation: tk var(--tk-dur, 120s) linear infinite; }
.ticker[data-mode="single"] .tk-rail { animation: none; width: 100%; }
.ticker[data-paused] .tk-rail { animation-play-state: paused; }
@keyframes tk { to { transform: translateX(-50%); } }
/* single-rule mode */
.ticker[data-mode="single"] .tk-list { display: grid; width: 100%; }
.ticker[data-mode="single"] .tk-list li {
  grid-area: 1 / 1; display: block; white-space: normal; padding: 0; opacity: 0; pointer-events: none; transition: opacity 160ms var(--ease-out);
}
.ticker[data-mode="single"] .tk-list li::after { display: none; }
.ticker[data-mode="single"] .tk-list li.on { opacity: 1; animation: wipe 300ms var(--ease-out); }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (min-width: 768px) {
  .ticker { min-height: 44px; }
  .tk-label { flex-direction: row; align-items: center; font-size: var(--fs-label); padding: 0 16px; }
  .tk-label span:first-child::after { content: "\00a0"; }
  .tk-btn { padding: 0 14px; }
  .tk-list { font-size: 0.9375rem; }
}
@media (hover: hover) and (pointer: fine) {
  .ticker:hover .tk-rail { animation-play-state: paused; }
  .tk-btn:hover { background: var(--newsprint); }
}
.ticker:focus-within .tk-rail { animation-play-state: paused; }
/* no JavaScript: one whole rule, no dead button */
.ticker:not([data-mode]) { grid-template-columns: auto minmax(0, 1fr); }
.ticker:not([data-mode]) .tk-btn { display: none; }
.ticker:not([data-mode]) .tk-list li { white-space: normal; }
.ticker:not([data-mode]) .tk-list li:not(:first-child) { display: none; }
