/* Ten live market cards under the live chart (assets/js/tickers.js), modelled on the macOS Stocks widget. */
.tk-wrap { margin-top: 20px; }
.tk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
/* 5 over 5 on wide screens; 2 across (5 rows) below that, so the grid never leaves a card alone on a row. */
@media (max-width: 1100px) { .tk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.tk {
  --tk: var(--bl-profit, #1db954);
  position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: 14px 14px 10px; border-radius: 20px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--ink) 7%,transparent), 0 10px 30px light-dark(rgba(0,0,0,.10), rgba(0,0,0,.45));
  font-family: var(--bl-font, Satoshi, system-ui, sans-serif); color: var(--bl-ink, #f3f3f3);
  font-variant-numeric: tabular-nums;
  transition: transform .26s cubic-bezier(.23,1,.32,1), box-shadow .26s cubic-bezier(.23,1,.32,1);
}
.tk:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--ink) 12%,transparent), 0 14px 36px light-dark(rgba(0,0,0,.16), rgba(0,0,0,.55)); }
.tk.down { --tk: var(--bl-loss, #ef4444); }

.tk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tk-head > div { min-width: 0; display: flex; flex-direction: column; }
.tk-sym { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.tk-arrow { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--tk); }
.tk.down .tk-arrow { border-bottom: 0; border-top: 8px solid var(--tk); }
.tk-name { font-size: 12px; color: var(--bl-muted, #8c8c8c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tk-chg { align-items: flex-end; text-align: right; color: var(--tk); font-size: 13px; font-weight: 700; flex: none; }
.tk-chg span { font-size: 12px; font-weight: 600; margin-top: 2px; }

.tk-px { font-size: clamp(24px, 2.2vw, 30px); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; margin: 12px 0 8px; }

.tk-ohl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 0 8px; }
.tk-ohl div { min-width: 0; }
.tk-ohl dt { font-size: 10.5px; color: var(--bl-muted, #8c8c8c); }
.tk-ohl dd { margin: 1px 0 0; font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tk-chart { display: block; width: 100%; height: 100%; overflow: visible; }
.tk-line { fill: none; stroke-width: 1.7; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.tk-line.up { stroke: var(--tk-up); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--tk-up) 45%, transparent)); }
.tk-line.down { stroke: var(--tk-down); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--tk-down) 45%, transparent)); }
.tk-ref { stroke: color-mix(in srgb,var(--ink) 28%,transparent); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.tk-gl { stroke: color-mix(in srgb,var(--ink) 10%,transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tk-axis { position: relative; height: 14px; margin-top: 3px; font-size: 10px; color: var(--bl-muted, #8c8c8c); }
.tk-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }

/* Loading shimmer until the first 24 h of data arrives; "Feed paused" when the API can't be reached. */
#tickers.loading .tk-px, #tickers.loading .tk-ohl dd, #tickers.loading .tk-chg { color: transparent; background: linear-gradient(90deg, var(--card-2), color-mix(in srgb, var(--ink) 10%, var(--card-2)), var(--card-2)); background-size: 200% 100%; animation: tk-shim 1.2s linear infinite; border-radius: 6px; }
@keyframes tk-shim { to { background-position: -200% 0; } }
.tk-note { display: flex; justify-content: space-between; gap: 12px; margin: 10px 2px 0; font-size: 12px; color: var(--bl-faint, #5c5c5c); }
.tk-note .tk-paused { display: none; color: var(--bl-muted, #8c8c8c); }
.tk-wrap:has(#tickers.paused) .tk-paused { display: inline; }
@media (prefers-reduced-motion: reduce) { .tk, #tickers.loading * { transition: none; animation: none; } }

/* ---- advanced chart (tickers.js draw/hover) ---- */
.tk { --tk-up: var(--bl-profit, var(--profit, #1db954)); --tk-down: var(--bl-loss, var(--loss, #ef4444)); }
.tk-plot { position: relative; height: 72px; margin-top: 2px; touch-action: pan-y; cursor: crosshair; }
.tk-vol rect { fill: color-mix(in srgb, var(--ink, #f3f3f3) 16%, transparent); }
.tk-prev { position: absolute; right: 0; transform: translateY(-115%); font-size: 9.5px; font-weight: 600; letter-spacing: .01em; color: var(--bl-muted, #8c8c8c); background: color-mix(in srgb, var(--card, #141414) 82%, transparent); padding: 0 4px; border-radius: 4px; pointer-events: none; font-variant-numeric: tabular-nums; }
.tk-mk { position: absolute; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 1.5px var(--card, #141414); }
.tk-hi { background: var(--tk-up); }
.tk-lo { background: var(--tk-down); }
.tk-dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--tk-up); box-shadow: 0 0 0 2px var(--card, #141414), 0 0 10px var(--tk-up); pointer-events: none; }
.tk-dot.below { background: var(--tk-down); box-shadow: 0 0 0 2px var(--card, #141414), 0 0 10px var(--tk-down); }
.tk-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid currentColor; color: var(--tk-up); opacity: 0; animation: tk-pulse 2.2s cubic-bezier(.23,1,.32,1) infinite; }
.tk-dot.below::after { color: var(--tk-down); }
@keyframes tk-pulse { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
.tk-xh { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: color-mix(in srgb, var(--ink, #f3f3f3) 45%, transparent); pointer-events: none; }
.tk-xdot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--tk-up); box-shadow: 0 0 0 2px var(--card, #141414); pointer-events: none; }
.tk-xdot.below { background: var(--tk-down); }
.tk-tip { position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); display: flex; align-items: baseline; gap: 6px; white-space: nowrap; padding: 5px 8px; border-radius: 8px; font-size: 11px; background: var(--card-2, #1c1c1c); color: var(--ink, #f3f3f3); box-shadow: 0 6px 18px rgba(0,0,0,.28), inset 0 0 0 1px color-mix(in srgb, var(--ink, #f3f3f3) 10%, transparent); pointer-events: none; z-index: 3; font-variant-numeric: tabular-nums; }
.tk-tip b { font-weight: 700; }
.tk-tip .up { color: var(--tk-up); font-weight: 600; }
.tk-tip .down { color: var(--tk-down); font-weight: 600; }
.tk-tip em { font-style: normal; color: var(--bl-muted, #8c8c8c); }
.tk.scrub .tk-dot, .tk.scrub .tk-prev { opacity: .35; }
.tk [hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .tk-dot::after { animation: none; } }
