/* ===== ticker ================================================================
   The beige terminal on the desktop; opens the @griffinlaszlo exchange, a green
   phosphor stock board for the channel: followers, views and every video's
   numbers on TikTok, YouTube and Instagram (griffin-ticker.js, data in
   griffinlaszlo-stats.js). */
#ticker-icon-group {
    top: 181px;
    right: 223px;
}
#ticker-icon {
    -webkit-user-drag: none;
    user-drag: none;
    user-select: none;
    position: absolute;
    top: 0;
    right: 26px; /* centers the 48px icon within the 100px group */
    width: 48px;
    height: auto;
    image-rendering: pixelated;
}
#ticker-icon-label {
    position: absolute;
    top: 50px;
    right: 0;
    width: 100px;
    text-align: center;
    font-family: 'W95FA', sans-serif;
    font-size: 13px;
    line-height: 1.2;
}
#ticker-icon-label a {
    color: #fff;
    text-decoration: none;
}

#ticker-window {
    display: none;
    width: 760px;
    max-width: calc(100vw - 16px);
    left: 18vw;
    top: 4vw;
    text-align: left;
}

/* The tube: one palette for the whole screen. Phosphor green is the ink,
   amber marks a number that held, red one that fell. */
.tk-inner {
    --tk-glass: #03100a;
    --tk-glass-2: #062015;
    --tk-ink: #39ff88;
    --tk-ink-dim: #1f9c55;
    --tk-ink-faint: #0f4a2a;
    --tk-amber: #ffb83d;
    --tk-red: #ff5f56;
    --tk-font: 'VT323', 'W95FA', ui-monospace, monospace;
    background: #c0c0c0;
    padding: 4px;
}
body.dark-mode .tk-inner {
    background: #a8a8a8;
}

.tk-crt {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 40%, var(--tk-glass-2) 0%, var(--tk-glass) 70%);
    color: var(--tk-ink);
    font-family: var(--tk-font);
    font-size: 20px;
    line-height: 1.1;
    text-shadow: 0 0 6px rgba(57, 255, 136, 0.45);
    box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset 0 0 60px rgba(0, 0, 0, 0.85);
    container-type: inline-size;
}
/* scanlines and a slow roll bar, over everything but never in the way */
.tk-crt::before,
.tk-crt::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}
.tk-crt::before {
    background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px);
}
.tk-crt::after {
    background: linear-gradient(to bottom, transparent 0%, rgba(57, 255, 136, 0.06) 50%, transparent 100%);
    height: 30%;
    animation: tk-roll 7s linear infinite;
}
@keyframes tk-roll {
    from { transform: translateY(-100%); }
    to   { transform: translateY(400%); }
}

/* ----- the tape: every quote rolling right to left ----- */
.tk-tape {
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--tk-ink-faint);
    background: rgba(57, 255, 136, 0.06);
    padding: 4px 0;
}
.tk-tape-track {
    display: inline-flex;
    animation: tk-tape 38s linear infinite;
}
.tk-tape:hover .tk-tape-track {
    animation-play-state: paused;
}
.tk-tape-item {
    padding: 0 18px;
    font-variant-numeric: tabular-nums;
}
.tk-tape-item b {
    font-weight: normal;
    color: #b6ffd2;
}
@keyframes tk-tape {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ----- header: the porthole, the handle, the total ----- */
.tk-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px 10px;
}
.tk-porthole {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(from 200deg, #6b6b6b, #e6e6e6, #6b6b6b, #e6e6e6, #6b6b6b);
    box-shadow: 0 0 0 2px #000, 0 0 18px rgba(57, 255, 136, 0.5);
}
#ticker-window .popup-inner-wrapper img.tk-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    filter: saturate(0.85) contrast(1.05);
}
.tk-porthole::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background:
        repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.25), transparent 45%);
    pointer-events: none;
}
.tk-handle {
    font-size: 34px;
    color: #d9ffe8;
    letter-spacing: 0.5px;
}
.tk-sub,
.tk-label {
    color: var(--tk-ink-dim);
    font-size: 16px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.tk-total {
    text-align: right;
}
.tk-big {
    font-size: 46px;
    line-height: 1;
    color: #d9ffe8;
    font-variant-numeric: tabular-nums;
}
.tk-chg {
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}
.tk-chg.up   { color: var(--tk-ink); }
.tk-chg.down { color: var(--tk-red); text-shadow: 0 0 6px rgba(255, 95, 86, 0.45); }
.tk-chg.flat { color: var(--tk-amber); text-shadow: 0 0 6px rgba(255, 184, 61, 0.4); }

/* ----- the board: one quote per platform ----- */
.tk-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 0 16px 12px;
}
.tk-card {
    display: grid;
    gap: 4px;
    align-content: start;
    min-width: 0;
    padding: 10px 10px 8px;
    border: 1px solid var(--tk-ink-faint);
    background: rgba(57, 255, 136, 0.03);
    color: inherit;
    text-decoration: none;
    cursor: url('cursor-pointer.png') 8 0, pointer;
}
.tk-card:hover,
.tk-card:focus-visible {
    border-color: var(--tk-ink-dim);
    background: rgba(57, 255, 136, 0.07);
    outline: none;
}
.tk-card-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.tk-sym {
    color: #b6ffd2;
}
.tk-name {
    color: var(--tk-ink-dim);
    letter-spacing: 1.5px;
}
.tk-price {
    font-size: 38px;
    line-height: 1;
    color: #d9ffe8;
    font-variant-numeric: tabular-nums;
}
.tk-price small {
    font-size: 16px;
    color: var(--tk-ink-dim);
    letter-spacing: 1px;
    margin-left: 4px;
}
.tk-chart {
    width: 100%;
    height: 72px;
    display: block;
    margin: 4px 0 2px;
}
.tk-stats {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 10px;
    margin: 0;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}
.tk-stats dt {
    color: var(--tk-ink-dim);
}
.tk-stats dd {
    margin: 0;
    text-align: right;
}
.tk-last {
    border-top: 1px dashed var(--tk-ink-faint);
    padding-top: 5px;
    margin-top: 2px;
    font-size: 16px;
    overflow-wrap: anywhere;
}
.tk-last q {
    color: #d9ffe8;
}

/* ----- movers: the biggest videos anywhere ----- */
.tk-movers {
    padding: 0 16px 10px;
}
.tk-movers h3 {
    margin: 0 0 4px;
    font-weight: normal;
    font-size: 16px;
    color: var(--tk-ink-dim);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.tk-movers ol {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}
.tk-movers li a {
    display: grid;
    grid-template-columns: 2.2em 3.2em 1fr auto;
    gap: 8px;
    padding: 1px 4px;
    color: inherit;
    text-decoration: none;
    cursor: url('cursor-pointer.png') 8 0, pointer;
}
.tk-movers li a:hover,
.tk-movers li a:focus-visible {
    background: var(--tk-ink);
    color: var(--tk-glass);
    text-shadow: none;
    outline: none;
}
.tk-movers .tk-cap {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tk-foot {
    border-top: 1px solid var(--tk-ink-faint);
    padding: 6px 16px 8px;
    font-size: 15px;
    color: var(--tk-ink-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.tk-cursor {
    display: inline-block;
    width: 0.55em;
    height: 0.9em;
    background: var(--tk-ink);
    vertical-align: -0.1em;
    animation: tk-blink 1s steps(1) infinite;
}
@keyframes tk-blink {
    50% { opacity: 0; }
}

/* ----- boot: the screen warms up when the window opens ----- */
.tk-crt.is-booting .tk-head,
.tk-crt.is-booting .tk-board,
.tk-crt.is-booting .tk-movers {
    animation: tk-warm 0.9s ease-out both;
}
.tk-crt.is-booting .tk-board  { animation-delay: 0.12s; }
.tk-crt.is-booting .tk-movers { animation-delay: 0.24s; }
@keyframes tk-warm {
    0%   { opacity: 0; filter: brightness(3) blur(2px); }
    40%  { opacity: 1; }
    100% { opacity: 1; filter: none; }
}

@media (max-width: 560px) {
    .tk-head {
        grid-template-columns: auto 1fr;
    }
    .tk-total {
        grid-column: 1 / -1;
        text-align: left;
    }
    .tk-handle { font-size: 28px; }
    .tk-movers li a {
        grid-template-columns: 2.2em 1fr auto;
    }
    .tk-movers .tk-plat { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .tk-tape-track,
    .tk-crt::after,
    .tk-cursor,
    .tk-crt.is-booting .tk-head,
    .tk-crt.is-booting .tk-board,
    .tk-crt.is-booting .tk-movers {
        animation: none;
    }
    .tk-tape {
        overflow-x: auto;
    }
}
