/* Price direction is semantic: green up, red down, neutral unchanged. */
body .home-live-prices,
body .ticker {
  --market-up: #bebebe;
  --market-down: #ff737f;
  --market-flat: #b2b2b2;
  background: #151515;
  color: #f7f7f7;
  border-top-color: #363636;
}
body .home-price-head {
  min-height: 94px;
  gap: 20px;
}
body .home-price-title {
  gap: 12px;
}
body .home-price-title h2 {
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}
body .home-price-title .home-price-unit {
  margin: 8px 0 0;
  font-size: 0.73rem;
  color: #a7a7a7;
}
body .home-live-dot {
  width: 8px;
  height: 8px;
  background: #979797;
  box-shadow: 0 0 0 6px #97979714;
  animation: none;
}
body .home-price-actions {
  flex-shrink: 0;
  gap: 8px;
}
body .home-price-actions a {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.76rem;
  border-radius: 7px;
}
body .home-price-actions .home-price-download {
  border-color: #444444;
  color: #dfdfdf;
}
body .home-price-actions .home-price-view {
  background: #303030 !important;
  border-color: #4c4c4c !important;
  color: #fff !important;
}
body .home-price-actions a:hover {
  background: #404040 !important;
  color: #fff;
}
body .home-ticker,
body .ticker-window {
  direction: ltr;
  background: #0f0f0f;
}
body .home-ticker {
  height: 122px;
  border-block: 1px solid #303030;
}
body .home-ticker-track,
body .ticker-track {
  direction: ltr;
  display: flex;
  align-items: stretch;
  width: max-content;
  animation: marketFlow var(--market-duration, 100s) linear infinite;
}
.market-ticker-group {
  display: flex;
  flex: none;
  align-items: stretch;
}
body .home-ticker .home-ticker-item,
body .ticker-window .ticker-item {
  direction: rtl;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 24px;
  row-gap: 10px;
  flex: none;
  min-width: 300px;
  margin: 0;
  padding: 17px 26px;
  border: 0;
  border-inline-end: 1px solid #323232;
  border-radius: 0;
  background: transparent;
  color: #efefef;
  text-align: right;
  font: inherit;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease;
}
body .home-ticker .home-ticker-item::before,
body .ticker-window .ticker-item::before {
  display: none;
}
body .home-ticker .home-ticker-item > b,
body .ticker-window .ticker-item > b {
  grid-column: 1/-1;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cccccc;
}
body .home-ticker-quote {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
body .home-ticker-quote strong {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.025em;
  font-variant-numeric: tabular-nums;
}
body .home-ticker-quote small {
  font-size: 0.65rem;
  color: #969696;
  font-weight: 400;
}
body .home-ticker-change {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
body .home-ticker-change i {
  font-style: normal;
  font-size: 1rem;
}
body :is(.home-ticker-item, .ticker-item).up .home-ticker-quote strong,
body :is(.home-ticker-item, .ticker-item).up .home-ticker-change {
  color: var(--market-up);
}
body :is(.home-ticker-item, .ticker-item).down .home-ticker-quote strong,
body :is(.home-ticker-item, .ticker-item).down .home-ticker-change {
  color: var(--market-down);
}
body :is(.home-ticker-item, .ticker-item).flat .home-ticker-change {
  color: var(--market-flat);
}
body :is(.home-ticker-item, .ticker-item).up .home-ticker-change {
  background: #bebebe13;
}
body :is(.home-ticker-item, .ticker-item).down .home-ticker-change {
  background: #ff737f13;
}
body .home-ticker .home-ticker-item:hover,
body .ticker-window .ticker-item:hover {
  background: #ffffff08;
}
body
  :is(.home-ticker, .ticker-window):is(:hover, :focus-within)
  :is(.home-ticker-track, .ticker-track) {
  animation-play-state: paused;
}
body :is(.home-ticker-item, .ticker-item):focus-visible {
  outline: 2px solid #e7e7e7;
  outline-offset: -4px;
}
body .ticker {
  height: 122px;
  grid-template-columns: 155px minmax(0, 1fr);
}
body.afa-pack-ui.afa-background-page.afa-ordered-layout .ticker-label {
  background: #282828 !important;
  color: #ebebeb !important;
  clip-path: none;
  padding-inline: 24px;
}
body .ticker-label span {
  font-size: 0.95rem;
}
body .ticker-label small {
  margin-top: 8px;
  font-size: 0.55rem;
}
body .market-ticker-empty {
  padding: 20px 28px;
  color: #c5c5c5;
  font-size: 0.85rem;
}
/* Keep table semantics and make its full row an entry to the existing chart. */
body.prices-page {
  --green: #616161;
  --green-bg: #f3f3f3;
  --danger: #c6293c;
  --danger-bg: #f3f3f3;
}
body.prices-page .change-badge.up {
  color: #616161;
  background: #f3f3f3;
}
body.prices-page .change-badge.down {
  color: #c6293c;
  background: #f3f3f3;
}
body.prices-page .change-badge.flat {
  color: #707070;
  background: #f2f2f2;
}
body.prices-page .legend .up {
  background: #616161;
}
body.prices-page .legend .down {
  background: #c6293c;
}
body #priceRows tr[data-price-row-id] {
  cursor: pointer;
}
body #priceRows tr[data-price-row-id]:hover {
  background: #f7f7f7;
}
body #priceRows tr[data-price-row-id]:focus-visible {
  outline: 2px solid #616161;
  outline-offset: -3px;
}
body #priceRows button[data-price-history] {
  color: #474747;
  background: #f9f9f9;
  border-color: #e1e1e1;
}
body .price-history .history-change.is-up > strong {
  color: #616161;
}
body .price-history .history-change.is-down > strong {
  color: #c6293c;
}
body .price-history .history-change.is-flat > strong {
  color: #727272;
}
@keyframes marketFlow {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
/* Keep the board header inside its card rather than inheriting page-shell offsets. */
body.afa-pack-ui.afa-background-page.afa-ordered-layout .home-live-prices > .home-price-head.shell {
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 20px 28px;
  min-height: 84px;
  flex-wrap: nowrap;
}
body.afa-pack-ui.afa-background-page.afa-ordered-layout .home-price-title h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.65;
  letter-spacing: 0;
  font-weight: 700;
}
body.afa-pack-ui.afa-background-page.afa-ordered-layout .home-price-title .home-price-unit {
  font-size: 11px;
  line-height: 1.8;
  margin: 3px 0 0;
}
body.afa-pack-ui.afa-background-page.afa-ordered-layout .home-price-actions {
  margin: 0;
  margin-inline-start: auto;
}
body .home-ticker {
  height: 138px;
}
body .ticker {
  height: 138px;
}
body :is(.home-ticker-track, .ticker-track).is-empty {
  animation: none;
  transform: none;
}
body .home-ticker .home-ticker-item,
body .ticker-window .ticker-item {
  min-width: 310px;
  padding: 18px 24px;
  row-gap: 12px;
}
body .home-ticker .home-ticker-item > b,
body .ticker-window .ticker-item > b {
  font-size: 13px;
  line-height: 1.8;
  font-weight: 500;
  color: #dadada;
}
body .home-ticker-quote {
  display: grid;
  gap: 5px;
}
body .home-ticker-quote strong {
  font:
    700 27px/1.25 Tahoma,
    Arial,
    sans-serif;
  letter-spacing: 0.02em;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}
body .home-ticker-quote small {
  display: block;
  font-size: 10px;
  line-height: 1.7;
  color: #9e9e9e;
}
body .home-ticker-change {
  font:
    600 12px/1.7 Tahoma,
    Arial,
    sans-serif;
  padding: 5px 9px;
}
@media (max-width: 760px) {
  body.afa-pack-ui.afa-background-page.afa-ordered-layout
    .home-live-prices
    > .home-price-head.shell {
    flex-wrap: wrap;
    padding: 18px;
  }
  body.afa-pack-ui.afa-background-page.afa-ordered-layout .home-price-title h2 {
    font-size: 19px;
  }
  body .home-price-head {
    padding-block: 18px;
    gap: 16px;
  }
  body .home-price-actions {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  body .home-price-actions a {
    width: auto;
    flex: 1;
    padding-inline: 10px;
    font-size: 0.7rem;
  }
  body .home-price-actions .home-price-download {
    order: 0;
  }
  body .home-ticker .home-ticker-item,
  body .ticker-window .ticker-item {
    min-width: 270px;
    padding: 17px 20px;
    gap: 9px 18px;
  }
  body .home-ticker-quote strong {
    font-size: 1.5rem;
  }
  body .ticker {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  body.afa-pack-ui.afa-background-page.afa-ordered-layout .ticker-label {
    padding-inline: 12px;
  }
  body .ticker-label span {
    font-size: 0.8rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  body .home-ticker,
  body .ticker-window {
    overflow-x: auto;
  }
  body .home-ticker-track,
  body .ticker-track {
    animation: none;
    transform: none;
  }
  .market-ticker-group[aria-hidden='true'] {
    display: none;
  }
}
/* Exchange-board numerals: real selectable text rendered with a local digital face. */
@font-face {
  font-family: 'AFA Digital';
  src: url('/fonts/afa-digital/AFA-Digital-Regular.ttf') format('truetype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+002C-002E, U+0030-0039, U+0660-066C, U+06F0-06F9;
}
html[lang]
  body.afa-card-ui.afa-pack-ui.afa-background-page.afa-ordered-layout
  :is(.home-ticker-quote strong, .ticker-item .home-ticker-quote strong) {
  font-family: 'AFA Digital', var(--locale-font), monospace !important;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.06em;
  font-synthesis: none;
  text-shadow: 0 0 8px currentColor;
  direction: ltr;
  unicode-bidi: isolate;
}
html[lang] body .home-live-prices,
html[lang] body .ticker {
  --market-up: #5ee3a1;
  --market-down: #ff727d;
  --market-flat: #d5d9de;
  background: #101416;
  border: 1px solid #30383c;
  box-shadow: inset 0 1px 0 #ffffff08;
}
html[lang] body .home-ticker,
html[lang] body .ticker-window {
  background-color: #090d0f;
  background-image: radial-gradient(#34453b40 0.7px, transparent 0.8px);
  background-size: 4px 4px;
  border-color: #283235;
}
html[lang] body .home-ticker .home-ticker-item,
html[lang] body .ticker-window .ticker-item {
  border-color: #283235;
  min-width: 310px;
}
html[lang] body .home-ticker-item.up .home-ticker-quote strong {
  color: #5ee3a1;
}
html[lang] body .home-ticker-item.down .home-ticker-quote strong {
  color: #ff727d;
}
html[lang] body .home-ticker-item.flat .home-ticker-quote strong {
  color: #d5d9de;
}
html[lang] body .home-ticker-change {
  border: 1px solid #ffffff0d;
  background: #ffffff05;
}
html[lang] body .home-ticker-change > span {
  font-family: 'AFA Digital', var(--locale-font), monospace !important;
  letter-spacing: 0.04em;
  font-size: 14px;
}
@media (max-width: 600px) {
  html[lang]
    body.afa-card-ui.afa-pack-ui.afa-background-page.afa-ordered-layout
    .home-ticker-quote
    strong {
    font-size: 30px;
  }
}
