/* news-timeline — 종목별 분석 가로축 + 리스트 양방향 hover */

.news-timeline {
    max-width: 1180px;
    margin: 1.5rem auto 2rem;
    padding: 1.25rem 1.5rem 1.5rem;
    background: var(--surface, #13141b);
    border: 1px solid var(--border-subtle, #2a2c38);
    border-radius: 10px;
}

.news-timeline__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.news-timeline__title {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--text-primary, #e8eaef);
}

.news-timeline__count {
    margin-left: 0.6rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-tertiary, #9098a8);
}

.news-timeline__toggle {
    display: inline-flex;
    gap: 0;
    background: var(--bg, #0a0b10);
    border: 1px solid var(--border-subtle, #2a2c38);
    border-radius: 8px;
    overflow: hidden;
}

.news-timeline__btn {
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    color: var(--text-tertiary, #9098a8);
    text-decoration: none;
    border-right: 1px solid var(--border-subtle, #2a2c38);
    transition: background 0.12s, color 0.12s;
}

.news-timeline__btn:last-child { border-right: 0; }
.news-timeline__btn:hover { color: var(--text-primary, #e8eaef); }
.news-timeline__btn.is-active {
    background: var(--accent, #6ea8ff);
    color: #0a0b10;
    font-weight: 600;
}

/* 가로축 트랙 */
.news-timeline__track {
    position: relative;
    height: 64px;
    margin: 0.5rem 0 1.6rem;
    padding: 12px 8px;
}

.news-timeline__axis {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 50%;
    height: 2px;
    background: var(--border-subtle, #2a2c38);
    border-radius: 1px;
    pointer-events: none;
}

.news-timeline__axis-label {
    position: absolute;
    bottom: -4px;
    font-size: 0.66rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    color: var(--text-tertiary, #9098a8);
}
.news-timeline__axis-label--start { left: 0; }
.news-timeline__axis-label--mid { left: 50%; transform: translateX(-50%); }
.news-timeline__axis-label--end { right: 0; }

/* 점 */
.news-timeline__dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--accent, #6ea8ff);
    border: 2px solid var(--surface, #13141b);
    box-shadow: 0 0 0 0 rgba(110, 168, 255, 0);
    transition: transform 0.14s, box-shadow 0.14s, background 0.14s;
    cursor: pointer;
    z-index: 1;
}
.news-timeline__dot:hover,
.news-timeline__dot.is-highlight {
    transform: translate(-50%, -50%) scale(1.5);
    box-shadow: 0 0 0 6px rgba(110, 168, 255, 0.2);
    background: #9bbcff;
    z-index: 5;
}

/* 점 tooltip — 마우스오버 시 제목 */
.news-timeline__tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    display: none;
    width: max-content;
    max-width: 320px;
    padding: 8px 12px;
    background: var(--bg, #0a0b10);
    border: 1px solid var(--border-subtle, #2a2c38);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-size: 0.78rem;
    line-height: 1.4;
    pointer-events: none;
    z-index: 10;
}
.news-timeline__dot:hover .news-timeline__tooltip,
.news-timeline__dot.is-highlight .news-timeline__tooltip {
    display: block;
}
.news-timeline__tooltip-date {
    display: block;
    color: var(--text-tertiary, #9098a8);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.66rem;
    margin-bottom: 4px;
}
.news-timeline__tooltip-title {
    display: block;
    color: var(--text-primary, #e8eaef);
    font-weight: 500;
}

/* 리스트 (점과 양방향) */
.news-timeline__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
    border-top: 1px solid var(--border-subtle, #2a2c38);
}
.news-timeline__list-item {
    border-bottom: 1px solid var(--border-subtle, #2a2c38);
    transition: background 0.12s;
}
.news-timeline__list-item:hover,
.news-timeline__list-item.is-highlight {
    background: rgba(110, 168, 255, 0.06);
}
.news-timeline__list-item:last-child { border-bottom: 0; }

.news-timeline__list-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.4rem;
    text-decoration: none;
    color: var(--text-primary, #e8eaef);
}
.news-timeline__list-date {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    color: var(--text-tertiary, #9098a8);
    flex: 0 0 42px;
}
.news-timeline__list-title {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.4;
}
.news-timeline__list-score {
    flex: 0 0 32px;
    text-align: right;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    color: var(--accent, #6ea8ff);
    font-weight: 600;
}

/* 모바일 — 트랙 높이 축소·점 작게 */
@media (max-width: 640px) {
    .news-timeline { padding: 1rem 0.9rem 1.1rem; }
    .news-timeline__head { gap: 0.5rem; }
    .news-timeline__track { height: 52px; padding: 8px 4px; }
    .news-timeline__btn { padding: 0.3rem 0.7rem; }
    .news-timeline__list { max-height: 240px; }
}
