/* Signal Desk — reset and base elements */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--sd-header-h) + var(--sd-ticker-h) + 16px);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--sd-bg);
  color: var(--sd-text);
  font-family: var(--sd-font-ui);
  font-size: var(--sd-t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--sd-amber); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, dl, dd, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
strong { font-weight: 650; }

::selection { background: var(--sd-amber-soft); color: var(--sd-text); }

:focus-visible {
  outline: 2px solid var(--sd-amber);
  outline-offset: 2px;
  border-radius: var(--sd-r-1);
}

.sd-num,
td[data-field],
.sd-stat dd,
.sd-tick__px,
.sd-tick__chg,
.sd-mover__px,
.sd-mover__pct {
  font-family: var(--sd-font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.02em;
}

.sd-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.sd-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--sd-amber); color: var(--sd-on-accent);
  padding: var(--sd-s-3) var(--sd-s-4); font-weight: 650;
}
.sd-skip:focus { left: var(--sd-s-4); top: var(--sd-s-4); }

@keyframes sd-flash-up {
  from { background: var(--sd-up-soft); }
  to { background: transparent; }
}
@keyframes sd-flash-down {
  from { background: var(--sd-down-soft); }
  to { background: transparent; }
}
@keyframes sd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.is-flash-up { animation: sd-flash-up 600ms var(--sd-ease); }
.is-flash-down { animation: sd-flash-down 600ms var(--sd-ease); }

/* Progressive enhancement: theme changes cross-fade when the browser supports it. */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 220ms;
    animation-timing-function: var(--sd-ease);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
