:root {
    --brand: #6BB8E3;
    --brand-rgb: 107, 184, 227;
    --bg-0: #06090d;
    --bg-1: #0b1118;
    --surface-0: #0e151d;
    --surface-1: #101b25;
    --surface-2: #142230;
    --text: #e5ecf3;
    --text-dim: #97a7b8;
    --positive: #34c759;
    --negative: #ff5c70;
    --line-soft: rgba(255, 255, 255, 0.08);
    --line-brand: rgba(var(--brand-rgb), 0.34);
    --shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    color: var(--text);
    line-height: 1.45;
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% -8%, rgba(var(--brand-rgb), 0.15), transparent 40%),
        radial-gradient(circle at 88% -12%, rgba(255, 255, 255, 0.06), transparent 34%),
        linear-gradient(180deg, #070c12 0%, #06090d 52%, #070c12 100%);
}

.ticker-tape {
    background: #05080d;
    border-bottom: 1px solid var(--line-soft);
    overflow: hidden;
    white-space: nowrap;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.36rem 1rem;
    min-width: 200%;
    animation: ticker-scroll 40s linear infinite;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    color: var(--text-dim);
}

.ticker-item .ticker-label {
    color: rgba(var(--brand-rgb), 0.95);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ticker-item .ticker-price {
    color: #f4f8fd;
}

.ticker-item.up .ticker-change {
    color: var(--positive);
}

.ticker-item.down .ticker-change {
    color: var(--negative);
}

.ticker-item.flat .ticker-change {
    color: var(--text-dim);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(9, 15, 22, 0.96), rgba(7, 11, 17, 0.93));
    backdrop-filter: blur(10px);
}

.topbar-gradient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(var(--brand-rgb), 0.18) 0%, rgba(var(--brand-rgb), 0.03) 42%, rgba(255, 255, 255, 0.02) 100%);
    opacity: 0.55;
}

.header-inner,
.top-nav {
    width: min(1320px, calc(100% - 2.5rem));
    margin: 0 auto;
    position: relative;
}

.header-inner {
    padding: 0.95rem 0 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.brand-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(var(--brand-rgb), 0.7);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.12);
}

.brand-wordmark {
    width: 240px;
    height: auto;
}

.tagline {
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    font-weight: 500;
}

.header-meta {
    text-align: right;
    display: grid;
    gap: 0.32rem;
}

.status-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: rgba(var(--brand-rgb), 0.92);
    font-weight: 600;
}

.header-updated {
    font-size: 0.79rem;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 0.42rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.45);
    animation: pulse 2.2s ease-out infinite;
}

.exchange-status-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.34rem;
    margin-top: 0.15rem;
}

.exchange-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.16rem 0.45rem;
    font-size: 0.61rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.02);
}

.exchange-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.exchange-dot.open {
    background: var(--positive);
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.15);
}

.exchange-dot.closed {
    background: #72818f;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0 0.85rem;
}

.top-nav a {
    color: var(--text-dim);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.71rem;
    font-weight: 600;
    padding: 0.4rem 0.72rem;
    border: 1px solid transparent;
    border-radius: 999px;
    transition: color 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
    color: #d7ecfb;
    border-color: rgba(var(--brand-rgb), 0.55);
    background: rgba(var(--brand-rgb), 0.12);
}

.dashboard-shell {
    width: min(1320px, calc(100% - 2.5rem));
    margin: 1.35rem auto 1.35rem;
    display: grid;
    gap: 1.05rem;
}

.panel {
    background: linear-gradient(180deg, rgba(16, 27, 37, 0.88), rgba(11, 19, 27, 0.94));
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    box-shadow: var(--shadow);
    transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.panel:hover {
    border-color: rgba(var(--brand-rgb), 0.32);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.36);
}

.section-heading {
    margin-bottom: 0.85rem;
}

h2 {
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 700;
    color: #f0f6ff;
}

.section-note {
    margin-top: 0.32rem;
    font-size: 0.79rem;
    color: var(--text-dim);
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
    gap: 0.74rem;
}

.price-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(8, 13, 20, 0.72), rgba(11, 18, 27, 0.72));
    border-radius: var(--radius-md);
    padding: 0.9rem;
    transition: border-color 0.22s ease, background-color 0.22s ease, transform 0.22s ease;
}

.price-card:hover {
    border-color: rgba(var(--brand-rgb), 0.46);
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(9, 16, 23, 0.8), rgba(13, 21, 31, 0.8));
}

.price-card.up {
    box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.2);
}

.price-card.down {
    box-shadow: inset 0 0 0 1px rgba(255, 92, 112, 0.22);
}

.ratio-card .metal-price {
    color: rgba(var(--brand-rgb), 0.95);
}

.price-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.metal-name {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    font-weight: 600;
}

.metal-symbol {
    font-size: 0.67rem;
    color: rgba(var(--brand-rgb), 0.95);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.metal-price {
    margin-top: 0.44rem;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 1.34rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #f5f9ff;
}

.metal-change {
    margin-top: 0.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
}

.price-card.up .metal-change {
    color: var(--positive);
}

.price-card.down .metal-change {
    color: var(--negative);
}

.metal-change.muted,
.muted {
    color: var(--text-dim);
}

.heatmap-wrap {
    margin-top: 0.85rem;
}

.heatmap-title {
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.market-heatmap {
    display: flex;
    width: 100%;
    min-height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.heatmap-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    font-size: 0.67rem;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(245, 249, 255, 0.96);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.55rem;
}

.heatmap-segment:last-child {
    border-right: none;
}

.heatmap-segment.up {
    background: linear-gradient(180deg, rgba(52, 199, 89, 0.48), rgba(52, 199, 89, 0.22));
}

.heatmap-segment.down {
    background: linear-gradient(180deg, rgba(255, 92, 112, 0.52), rgba(255, 92, 112, 0.24));
}

.heatmap-segment.flat {
    background: linear-gradient(180deg, rgba(122, 134, 148, 0.34), rgba(122, 134, 148, 0.18));
}

.correlation-indicator {
    margin-top: 0.72rem;
    font-size: 0.78rem;
    color: #d8e8f7;
}

.corr-meta {
    color: var(--text-dim);
}

.updated-at {
    margin-top: 0.66rem;
    font-size: 0.76rem;
    color: var(--text-dim);
    letter-spacing: 0.03em;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.14fr 0.86fr;
    gap: 1.05rem;
    align-items: start;
}

.side-stack {
    display: grid;
    gap: 1.05rem;
}

.chart-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.58rem;
    margin-bottom: 0.85rem;
}

.control {
    display: grid;
    gap: 0.3rem;
}

.control span {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}

.chart-controls select,
.chart-controls button {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(var(--brand-rgb), 0.28);
    background: rgba(7, 13, 19, 0.92);
    color: var(--text);
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    font-size: 0.86rem;
    padding: 0.52rem 0.72rem;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.chart-controls select:focus-visible,
.chart-controls button:focus-visible,
.news-filter-btn:focus-visible {
    outline: none;
    border-color: rgba(var(--brand-rgb), 0.72);
    box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.2);
}

.chart-controls button {
    align-self: end;
    border-color: rgba(var(--brand-rgb), 0.58);
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.9), rgba(var(--brand-rgb), 0.66));
    color: #082030;
    font-weight: 700;
    cursor: pointer;
}

.chart-controls button:hover {
    filter: brightness(1.06);
}

.chart-frame {
    position: relative;
    border-radius: var(--radius-md);
    border: 1px solid rgba(var(--brand-rgb), 0.2);
    background: linear-gradient(180deg, rgba(8, 13, 20, 0.76), rgba(11, 17, 24, 0.76));
    min-height: 408px;
    overflow: hidden;
}

.chart-frame img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.24s ease, filter 0.24s ease;
}

.chart-frame.is-loading img {
    opacity: 0.24;
    filter: blur(1px);
}

.chart-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    color: var(--text-dim);
    background: linear-gradient(180deg, rgba(8, 13, 20, 0.2), rgba(8, 13, 20, 0.45));
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.chart-frame.is-loading .chart-loading {
    opacity: 1;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(var(--brand-rgb), 0.25);
    border-top-color: rgba(var(--brand-rgb), 0.95);
    animation: spin 0.9s linear infinite;
}

.loading-text {
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

.movers-list,
.levels-list {
    display: grid;
    gap: 0.65rem;
}

.range-item,
.level-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(8, 13, 20, 0.66), rgba(11, 18, 27, 0.78));
    padding: 0.7rem;
}

.range-head,
.level-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.55rem;
}

.range-head h3,
.level-head h3 {
    font-size: 0.77rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.range-head span {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    color: #f3f8ff;
    font-size: 0.83rem;
}

.range-values {
    margin-top: 0.33rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: #c3d4e3;
    font-size: 0.68rem;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.range-values span {
    color: #afc4d7;
}

.intraday-range-bar {
    margin-top: 0.5rem;
    position: relative;
    height: 8px;
    border-radius: 999px;
    border: 1px solid rgba(var(--brand-rgb), 0.24);
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.intraday-range-bar .range-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: linear-gradient(90deg, rgba(var(--brand-rgb), 0.14), rgba(var(--brand-rgb), 0.44));
}

.intraday-range-bar .range-marker {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.35);
    background: #d0e6f7;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.2);
}

.level-item.bullish {
    box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.2);
}

.level-item.bearish {
    box-shadow: inset 0 0 0 1px rgba(255, 92, 112, 0.2);
}

.signal-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.14rem 0.46rem;
    background: rgba(var(--brand-rgb), 0.14);
    border: 1px solid rgba(var(--brand-rgb), 0.44);
    color: rgba(var(--brand-rgb), 0.95);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.level-values {
    margin-top: 0.38rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.34rem 0.7rem;
}

.level-values p {
    color: #b6c6d6;
    font-size: 0.71rem;
}

.level-values strong {
    color: #e8f0fa;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.72rem;
}

.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-bottom: 0.65rem;
}

.trending-now-block {
    margin-bottom: 0.82rem;
}

.trending-now-title {
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    color: #dceefe;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.trending-section {
    display: flex;
    gap: 0.58rem;
    overflow-x: auto;
    padding-bottom: 0.22rem;
    scroll-snap-type: x proximity;
}

.trending-section::-webkit-scrollbar {
    height: 8px;
}

.trending-section::-webkit-scrollbar-track {
    background: rgba(10, 16, 22, 0.85);
}

.trending-section::-webkit-scrollbar-thumb {
    background: rgba(var(--brand-rgb), 0.4);
    border-radius: 7px;
}

.trending-card {
    flex: 0 0 230px;
    scroll-snap-align: start;
    border: 1px solid rgba(var(--brand-rgb), 0.24);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(8, 13, 20, 0.76), rgba(11, 17, 24, 0.78));
    padding: 0.66rem;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.trending-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--brand-rgb), 0.6);
    background: linear-gradient(180deg, rgba(10, 16, 23, 0.86), rgba(13, 20, 29, 0.86));
}

.trending-card-title {
    font-size: 0.78rem;
    line-height: 1.35;
    color: #e8f1fa;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-card-meta {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.trending-source {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #b8cce0;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.trending-score {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.7rem;
    color: #9ccff2;
}

.trending-score-bar {
    margin-top: 0.38rem;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.trending-score-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(var(--brand-rgb), 0.42), rgba(var(--brand-rgb), 0.88));
}

.trending-empty {
    min-width: 100%;
}

.news-filter-btn {
    border: 1px solid rgba(var(--brand-rgb), 0.32);
    border-radius: 999px;
    padding: 0.24rem 0.58rem;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-filter-btn:hover,
.news-filter-btn.active {
    color: #dbecfb;
    border-color: rgba(var(--brand-rgb), 0.65);
    background: rgba(var(--brand-rgb), 0.2);
}

.news-feed {
    max-height: 560px;
    overflow-y: auto;
    border: 1px solid rgba(var(--brand-rgb), 0.22);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(8, 13, 20, 0.76), rgba(11, 17, 24, 0.78));
}

.news-item {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background-color 0.22s ease, border-color 0.22s ease;
}

.news-item:hover {
    border-color: rgba(var(--brand-rgb), 0.28);
}

.news-item-main {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0.9rem 0.9rem 0.84rem;
    transition: background-color 0.22s ease;
}

.news-item:hover .news-item-main {
    background: rgba(var(--brand-rgb), 0.1);
}

.news-item:last-child {
    border-bottom: 0;
}

.news-original-link {
    position: absolute;
    top: 0.6rem;
    right: 0.64rem;
    z-index: 2;
    width: 1.58rem;
    height: 1.58rem;
    border-radius: 50%;
    border: 1px solid rgba(var(--brand-rgb), 0.38);
    color: rgba(var(--brand-rgb), 0.95);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    background: rgba(7, 13, 19, 0.86);
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.news-original-link:hover {
    border-color: rgba(var(--brand-rgb), 0.78);
    background: rgba(var(--brand-rgb), 0.2);
    transform: translateY(-1px);
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding-right: 2rem;
}

.news-source {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    border: 1px solid rgba(var(--brand-rgb), 0.45);
    background: rgba(var(--brand-rgb), 0.12);
    color: rgba(var(--brand-rgb), 0.96);
    border-radius: 999px;
    padding: 0.18rem 0.46rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.62rem;
    font-weight: 700;
}

.sentiment-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sentiment-dot.bullish {
    background: var(--positive);
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18);
}

.sentiment-dot.bearish {
    background: var(--negative);
    box-shadow: 0 0 0 3px rgba(255, 92, 112, 0.18);
}

.sentiment-dot.neutral {
    background: #7d8b99;
    box-shadow: 0 0 0 3px rgba(125, 139, 153, 0.18);
}

.news-time-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.news-time {
    font-size: 0.7rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.reading-time {
    font-size: 0.7rem;
    color: #94a6b8;
    white-space: nowrap;
}

.news-title {
    margin-top: 0.42rem;
    font-size: 0.89rem;
    font-weight: 500;
    line-height: 1.36;
    color: #e7eff8;
}

.summary-preview {
    margin-top: 0.34rem;
    color: #9aaec2;
    font-size: 0.85rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-badge {
    position: absolute;
    top: 0.56rem;
    right: 2.45rem;
    z-index: 2;
    border-radius: 999px;
    border: 1px solid rgba(255, 167, 64, 0.62);
    background: linear-gradient(180deg, rgba(255, 177, 80, 0.26), rgba(255, 135, 48, 0.25));
    color: #ffdca5;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 0.15rem 0.44rem;
}

.news-tags {
    margin-top: 0.42rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.news-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #dbe8f5;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
    padding: 0.14rem 0.4rem;
    font-size: 0.61rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.star-count {
    margin-top: 0.46rem;
    color: #f0c765;
    font-size: 0.74rem;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.no-data {
    padding: 1.4rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.84rem;
}

.scroll-top-btn {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    border: 1px solid rgba(var(--brand-rgb), 0.45);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.9), rgba(var(--brand-rgb), 0.68));
    color: #052030;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.45rem 0.72rem;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 45;
}

.scroll-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.site-footer {
    width: min(1320px, calc(100% - 2.5rem));
    margin: 0 auto 1.7rem;
    border-top: 1px solid var(--line-soft);
    padding-top: 0.95rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    color: var(--text-dim);
    font-size: 0.78rem;
}

.news-feed::-webkit-scrollbar {
    width: 8px;
}

.news-feed::-webkit-scrollbar-track {
    background: rgba(10, 16, 22, 0.85);
}

.news-feed::-webkit-scrollbar-thumb {
    background: rgba(var(--brand-rgb), 0.4);
    border-radius: 7px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.5);
    }
    75% {
        box-shadow: 0 0 0 7px rgba(var(--brand-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0);
    }
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 1180px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .news-feed {
        max-height: 500px;
    }

    .trending-card {
        flex-basis: 210px;
    }
}

@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
    }

    .header-meta {
        text-align: left;
    }

    .header-updated {
        justify-self: start;
    }

    .exchange-status-row {
        justify-content: flex-start;
    }

    .top-nav {
        flex-wrap: wrap;
        padding-top: 0.1rem;
    }

    .chart-controls {
        grid-template-columns: 1fr 1fr;
    }

    .chart-controls button {
        grid-column: span 2;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .trending-card {
        flex-basis: 240px;
    }
}

@media (max-width: 640px) {
    .header-inner,
    .top-nav,
    .dashboard-shell,
    .site-footer {
        width: calc(100% - 1.4rem);
    }

    .brand-wordmark {
        width: 164px;
    }

    .panel {
        padding: 0.9rem;
    }

    .ticker-track {
        gap: 0.8rem;
        padding: 0.35rem 0.65rem;
    }

    .price-grid {
        grid-template-columns: 1fr;
    }

    .chart-controls {
        grid-template-columns: 1fr;
    }

    .chart-controls button {
        grid-column: auto;
    }

    .chart-frame {
        min-height: 300px;
    }

    .level-values {
        grid-template-columns: 1fr;
    }

    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.34rem;
    }

    .news-time-row {
        justify-content: flex-start;
    }

    .trending-badge {
        right: 2.2rem;
    }

    .news-original-link {
        top: 0.52rem;
        right: 0.52rem;
    }

    .trending-card {
        flex-basis: 82%;
    }

    .scroll-top-btn {
        right: 0.8rem;
        bottom: 0.85rem;
    }
}
