/* Science Compute Ticker (science-ticker-20261009): a stock-ticker strip of science-network compute under the tagline. */
.science-ticker {
  --sci-up: #34d399;
  --sci-down: #f87171;
  position: relative;
  display: flex;
  align-items: stretch;
  height: 36px;
  min-height: 36px; /* reserved before data arrives: no layout shift */
  margin: 0;
  padding: 0; /* the site-wide section rule adds 16px padding and a grid gap */
  gap: 0;
  overflow: hidden;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1;
}
body.theme-light .science-ticker { --sci-up: #047857; --sci-down: #b91c1c; }
.science-ticker[hidden] { display: none; }
.science-ticker-badge {
  flex: none;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: linear-gradient(90deg, #1f7a5a, #2a9d73);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  box-shadow: 6px 0 10px -6px rgba(0, 0, 0, 0.6);
}
.science-ticker-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9ffe2;
  box-shadow: 0 0 0 3px rgba(185, 255, 226, 0.25);
}
.science-ticker-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.science-ticker-track {
  display: flex;
  align-items: stretch;
  width: max-content;
  height: 100%;
  animation: science-marquee var(--sci-duration, 60s) linear infinite;
}
.science-ticker:hover .science-ticker-track,
.science-ticker.is-paused .science-ticker-track { animation-play-state: paused; }
@keyframes science-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.sci-chip {
  display: inline-flex;
  flex: none;
  width: auto; /* the site-wide input/select/button rule sets width: 100% */
  align-items: center;
  gap: 7px;
  height: 100%;
  margin: 0;
  padding: 0 14px;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
  min-height: 0;
  min-width: 0;
}
.sci-chip:hover, .sci-chip:focus-visible { background: rgba(127, 127, 127, 0.1); outline: none; }
.sci-code {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 4px;
}
.sci-name { color: var(--text); }
.sci-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.sci-est { color: var(--muted); font-size: 0.7rem; }
.sci-change { font-variant-numeric: tabular-nums; font-size: 0.76rem; font-weight: 600; }
.sci-up { color: var(--sci-up); }
.sci-down { color: var(--sci-down); }
.sci-flat, .sci-nodata { color: var(--muted); }
.sci-spark { width: 46px; height: 14px; overflow: visible; }
.sci-spark polyline { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.sci-total .sci-name { font-weight: 700; }
.sci-total .sci-value { color: #ffd60a; }
body.theme-light .sci-total .sci-value { color: #9a6b00; }
.sci-popover {
  position: absolute;
  z-index: 1000;
  width: 300px;
  max-width: calc(100vw - 24px);
  padding: 12px 14px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  font-size: 0.82rem;
  line-height: 1.5;
}
.sci-popover h3 { margin: 0 0 6px; font-size: 0.95rem; }
.sci-popover dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 8px; }
.sci-popover dt { color: var(--muted); }
.sci-popover dd { margin: 0; overflow-wrap: anywhere; }
.sci-popover .sci-formula { margin: 0 0 6px; color: var(--muted); font-size: 0.76rem; }
.sci-popover a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .science-ticker-track { animation: none; }
  .science-ticker-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 600px) {
  .science-ticker { font-size: 0.74rem; height: 32px; min-height: 32px; }
  .science-ticker-badge { padding: 0 9px; font-size: 0.6rem; }
  .sci-chip { padding: 0 10px; gap: 5px; }
  .sci-spark { width: 34px; }
}
/* Methodology page (science-compute.html): one readable column, accent links. */
#science-compute { grid-template-columns: minmax(0, 1fr); max-width: 920px; margin: 0 auto; }
#science-compute a { color: var(--accent); }
#science-compute li { margin: 4px 0; }
