.stock-timeline { --timeline-line: var(--color-white-10); max-width: 1180px; margin: 0 auto; padding: 120px 28px 80px; color: var(--text-primary); }
.stock-timeline a:focus-visible, .stock-timeline button:focus-visible, .stock-timeline input:focus-visible { outline: 3px solid var(--color-emerald); outline-offset: 4px; }
.timeline-back { display: inline-block; padding: 8px 0; margin-bottom: 20px; font-size: 13px; color: var(--text-muted); }
.timeline-hero { padding: 28px 32px; border: 1px solid var(--timeline-line); border-radius: 24px; background: var(--color-dark-secondary); }
.timeline-eyebrow { color: var(--hero-stat-value); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.timeline-hero h1 { max-width: 800px; font-size: clamp(26px, 3.5vw, 40px); font-weight: 800; letter-spacing: -.045em; line-height: 1.12; margin: 16px 0; overflow-wrap: anywhere; }
.timeline-hero h1 span { color: var(--hero-stat-value); }
.timeline-intro { max-width: 560px; color: var(--text-secondary); font-size: 16px; line-height: 1.8; }
.timeline-layout { display: flex; flex-direction: column; gap: 28px; margin-top: 28px; }
.timeline-sidebar-inner { padding: 20px 24px; border: 1px solid var(--timeline-line); border-radius: 16px; background: var(--color-dark-secondary); }
.timeline-date-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.timeline-date-nav a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 14px; padding: 8px 12px; border: 1px solid var(--timeline-line); border-radius: 8px; font-size: 13px; color: var(--text-muted); }
.timeline-date-nav a:hover { background: var(--color-white-5); color: var(--hero-stat-value); }
.timeline-date-nav a span:last-child { font-size: 11px; background: var(--color-white-5); border-radius: 5px; padding: 2px 6px; }
.timeline-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 24px; }
.timeline-section-heading h2 { font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
.timeline-section-heading p { margin-top: 6px; font-size: 13px; color: var(--text-muted); }
.timeline-section-heading > a { font-size: 13px; color: var(--hero-stat-value); }
.timeline-pill { display: inline-flex; padding: 5px 9px; border: 1px solid var(--timeline-line); border-radius: 7px; font-size: 10px; font-weight: 600; color: var(--text-muted); }
.timeline-list { padding-left: 26px; border-left: 1px solid var(--timeline-line); }
.timeline-day { scroll-margin-top: 110px; font-size: 12px; font-weight: 600; margin: 30px 0 16px; color: var(--text-muted); }
.timeline-day:first-child { margin-top: 0; }
.timeline-item { position: relative; padding: 24px 28px; margin-bottom: 14px; border: 1px solid var(--timeline-line); border-radius: 16px; background: var(--color-dark-secondary); }
.timeline-item::before { content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--color-emerald); left: -31px; top: 29px; box-shadow: 0 0 0 5px var(--color-dark); }
.timeline-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text-muted); font-size: 11px; }
.timeline-meta span { border-left: 1px solid var(--timeline-line); padding-left: 12px; }
.timeline-item h3 { margin-top: 12px; font-size: 17px; font-weight: 650; line-height: 1.65; letter-spacing: -.015em; overflow-wrap: anywhere; }
.timeline-body { margin-top: 12px; color: var(--text-secondary); font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--timeline-line); padding-top: 24px; margin-top: 32px; font-size: 13px; }
.timeline-pagination a { color: var(--hero-stat-value); padding: 12px 16px; border: 1px solid var(--timeline-line); border-radius: 10px; }
.timeline-pagination a:hover { background: var(--color-white-5); }
.timeline-pagination span { color: var(--text-muted); }
.timeline-empty { padding: 48px 24px; margin-top: 24px; border: 1px dashed var(--timeline-line); border-radius: 16px; text-align: center; color: var(--text-muted); line-height: 1.8; }
.timeline-empty h2 { color: var(--text-primary); font-size: 20px; margin-bottom: 8px; }
.timeline-empty a { display: inline-block; margin-top: 12px; color: var(--hero-stat-value); }
.stock-directory .timeline-section-heading { margin-top: 36px; }
.stock-search { max-width: 650px; margin-top: 28px; }
.stock-search-label { display: block; font-size: 12px; margin-bottom: 10px; color: var(--text-muted); }
.stock-search-field { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border: 1px solid var(--timeline-line); border-radius: 12px; background: var(--color-dark); }
.stock-search-field svg { flex-shrink: 0; color: var(--text-muted); }
.stock-search-field input { flex: 1; min-width: 0; width: 100%; background: transparent; border: 0; color: var(--text-primary); font: inherit; font-size: 14px; padding: 10px 0; }
.stock-search-field input::placeholder { color: var(--text-subtle); }
.stock-search-field button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--color-emerald-dark); color: white; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.stock-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stock-card { display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid var(--timeline-line); border-radius: 16px; background: var(--color-dark-secondary); transition: border-color .15s ease, background .15s ease; }
.stock-card:hover { border-color: var(--color-emerald); background: var(--color-white-5); }
.stock-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.stock-monogram { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--color-emerald) 12%, transparent); color: var(--hero-stat-value); }
.stock-card h3 { color: var(--text-primary); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.stock-symbol { margin: 6px 0 22px; font-size: 11px; letter-spacing: .06em; color: var(--text-muted); overflow-wrap: anywhere; }
.stock-card-link { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--timeline-line); color: var(--hero-stat-value); font-size: 12px; font-weight: 600; }
.stock-card-link span { font-size: 19px; }
@media (max-width: 900px) { .stock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
 .stock-timeline { padding: 96px 16px 48px; } .timeline-hero { padding: 28px 22px; border-radius: 18px; } .timeline-intro { font-size: 14px; }
 .timeline-layout { display: block; margin-top: 24px; } .timeline-sidebar-inner { position: static; }
 .timeline-date-nav { display: flex; flex-wrap: wrap; margin: 12px 0 0; } .timeline-date-nav a { flex-shrink: 0; gap: 12px; border: 1px solid var(--timeline-line); }
 .timeline-item { padding: 18px; } .timeline-list { padding-left: 18px; } .timeline-item::before { left: -23px; } .timeline-item h3 { font-size: 16px; }
 .stock-grid { grid-template-columns: 1fr; } .stock-card { padding: 20px; } .stock-search-field { gap: 8px; padding-left: 10px; } .stock-search-field button { padding: 0 12px; } .stock-search-field input { font-size: 16px; } .stock-search-field svg { display: none; }
}
@media (prefers-reduced-motion: reduce) { .stock-card { transition: none; } .stock-card:hover { transform: none; } }

/* Keep content readable at narrow widths and when text is enlarged. */
.stock-timeline, .stock-timeline * { box-sizing: border-box; }
.timeline-feed, .timeline-sidebar, .timeline-hero, .timeline-section-heading > div { min-width: 0; }
.timeline-hero, .timeline-section-heading, .timeline-meta, .timeline-empty { overflow-wrap: anywhere; }
.timeline-summary { display: flex; flex-wrap: wrap; gap: 20px 32px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--timeline-line); }
.timeline-summary dt { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.timeline-summary dd { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline-day { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 0; }
.timeline-day-count { font-size: 10px; font-weight: 400; color: var(--text-subtle); }
.timeline-day:target { color: var(--hero-stat-value); }
.timeline-meta time { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.timeline-meta span { min-width: 0; overflow-wrap: anywhere; }
.timeline-date-nav { padding: 4px; }
.timeline-date-nav a:focus-visible { outline-offset: -2px; }
.timeline-pagination a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.timeline-pagination a[rel="next"] { margin-left: auto; }
.timeline-section-heading > a, .timeline-empty a { min-height: 44px; display: inline-flex; align-items: center; }
.stock-search-field:focus-within { border-color: var(--color-emerald); }
.stock-search-field button { flex-shrink: 0; }
.stock-card-top { gap: 12px; }
.stock-monogram { flex-shrink: 0; }
@media (max-width: 640px) {
 .timeline-summary { gap: 16px 24px; margin-top: 20px; }
 .timeline-summary dd { font-size: 13px; }
 .timeline-hero { padding: 22px 18px; }
 .timeline-section-heading { gap: 10px; }
 .timeline-list { padding-left: 14px; }
 .timeline-item { padding: 16px; }
 .timeline-item::before { left: -19px; }
 .timeline-pagination { font-size: 12px; gap: 8px; }
 .timeline-pagination a { padding: 10px; }
 .timeline-date-nav { max-width: 100%; }
}
@media (max-width: 360px) {
 .stock-search-field { flex-wrap: wrap; padding: 10px; }
 .stock-search-field input { flex-basis: 100%; }
 .stock-search-field button { width: 100%; }
 .timeline-pagination span { order: -1; width: 100%; }
}

.stock-logo { overflow: hidden; background: #fff; border: 1px solid var(--timeline-line); }
.stock-logo img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.timeline-company { display: flex; align-items: center; gap: 18px; margin: 16px 0; }
.timeline-company h1 { margin: 0; min-width: 0; }
.timeline-company-logo { width: 64px; height: 64px; border-radius: 16px; font-size: 20px; }
@media (max-width: 640px) {
 .timeline-company { gap: 12px; }
 .timeline-company-logo { width: 48px; height: 48px; border-radius: 12px; font-size: 16px; }
}

.timeline-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; font-size: 12px; }
.timeline-sort label { color: var(--text-muted); }
.timeline-sort select, .timeline-sort button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--timeline-line); border-radius: 8px; background: var(--color-dark-secondary); color: var(--text-primary); font: inherit; }
.timeline-sort select { min-width: 0; max-width: 100%; cursor: pointer; }
.timeline-sort button { cursor: pointer; color: var(--hero-stat-value); }
.timeline-sort button:hover { background: var(--color-white-5); }
.timeline-sort select:focus-visible { outline: 3px solid var(--color-emerald); outline-offset: 3px; }

/* Reading layout with a desktop date sidebar and normal page scrolling. */
.stock-timeline:not(.stock-directory) { max-width: 1060px; }
.timeline-hero { border-top: 3px solid var(--color-emerald); box-shadow: 0 8px 28px rgba(0, 0, 0, .04); }
.timeline-summary { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(180px, 1.5fr) minmax(110px, 1fr); gap: 16px; }
.timeline-summary > div { padding: 8px 16px; border-left: 1px solid var(--timeline-line); }
.timeline-summary > div:first-child { padding-left: 0; border-left: 0; }
.timeline-summary > div:first-child dd { color: var(--hero-stat-value); font-size: 26px; line-height: 1.2; }
.timeline-feed > .timeline-section-heading { padding: 8px 0 20px; border-bottom: 1px solid var(--timeline-line); }
.timeline-item { border-radius: 12px; padding: 26px 30px; box-shadow: 0 4px 18px rgba(0, 0, 0, .025); }
.timeline-day { font-size: 13px; color: var(--text-primary); }
.timeline-day-count { margin-left: auto; padding: 4px 8px; border-radius: 6px; background: var(--color-white-5); }
.timeline-item h3 { font-size: 19px; line-height: 1.6; }
.timeline-body { max-width: 76ch; }
.stock-directory .timeline-hero { padding: 36px 40px; }
.stock-directory .stock-search { max-width: 760px; }
.stock-card { border-radius: 14px; }
.stock-card-link { border-top-style: dashed; }
@media (min-width: 901px) {
 .stock-timeline:not(.stock-directory) { max-width: 1180px; }
 .timeline-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: start; gap: 32px; }
 .timeline-sidebar-inner { display: flex; flex-direction: column; padding: 20px 16px; max-height: min(65vh, var(--timeline-sidebar-available, calc(100vh - 112px))); }
 .timeline-sidebar-inner > .timeline-eyebrow { flex-shrink: 0; }
 .timeline-sidebar.is-floating { position: sticky; top: var(--timeline-sidebar-top, 100px); }
 .timeline-date-nav { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--color-emerald) transparent; scrollbar-gutter: stable; padding: 2px 6px 2px 2px; }

 .stock-directory .timeline-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: center; }
 .stock-directory .timeline-eyebrow, .stock-directory .timeline-hero h1, .stock-directory .timeline-intro { grid-column: 1; }
 .stock-directory .stock-search { grid-column: 2; grid-row: 1 / 4; margin: 0; }
 .stock-directory .timeline-hero h1 { font-size: 36px; }
}
@media (max-width: 640px) {
 .timeline-sidebar-inner { padding: 16px; margin-bottom: 24px; }
 .timeline-summary { display: flex; flex-wrap: wrap; }
 .timeline-summary > div { padding: 0; border: 0; }
 .timeline-summary > div:first-child dd { font-size: 20px; }
 .timeline-item { padding: 18px; }
 .timeline-item h3 { font-size: 16px; }
 .stock-directory .timeline-hero { padding: 24px 20px; }
 .timeline-date-nav { padding: 0; }
}

/* Sentiment uses both words and color; missing analysis is never marked neutral. */
.stock-timeline { --sentiment-positive: #6ee7b7; --sentiment-negative: #fda4af; --sentiment-neutral: #93c5fd; }
[data-theme="light"] .stock-timeline { --sentiment-positive: #047857; --sentiment-negative: #be123c; --sentiment-neutral: #1d4ed8; }
.timeline-tone-positive { --news-tone: var(--sentiment-positive); }
.timeline-tone-negative { --news-tone: var(--sentiment-negative); }
.timeline-tone-neutral { --news-tone: var(--sentiment-neutral); }
.timeline-tone-unknown { --news-tone: var(--text-muted); }
.timeline-item { border-left: 3px solid var(--news-tone, var(--timeline-line)); background: linear-gradient(110deg, color-mix(in srgb, var(--news-tone, transparent) 5%, transparent), transparent 55%), var(--color-dark-secondary); }
.timeline-item::before { background: var(--news-tone, var(--color-emerald)); left: -33px; }
.timeline-meta .timeline-sentiment { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--news-tone) 25%, transparent); border-radius: 7px; background: color-mix(in srgb, var(--news-tone) 9%, transparent); color: var(--news-tone); font-weight: 600; line-height: 1.5; }
.timeline-meta .timeline-sentiment > span { border: 0; padding: 0; font-size: 14px; }
.timeline-confidence { font-size: 10px; color: var(--text-muted); }
.timeline-day { padding: 12px 14px; border-radius: 9px; background: color-mix(in srgb, var(--color-emerald) 7%, transparent); }
.timeline-hero { background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--color-emerald) 10%, transparent), transparent 65%), var(--color-dark-secondary); }
.timeline-summary > div:nth-child(2) dd { color: var(--sentiment-neutral); }
.timeline-date-nav a:hover, .timeline-date-nav a:focus-visible { background: color-mix(in srgb, var(--color-emerald) 12%, transparent); border-color: var(--color-emerald); }
@media (max-width: 640px) { .timeline-item::before { left: -21px; } .timeline-meta { gap: 8px; } }

/* Shared visual hierarchy for the directory and reading view. */
.stock-timeline { --surface-highlight: color-mix(in srgb, var(--color-emerald) 8%, var(--color-dark-secondary)); }
.timeline-hero { border-radius: 20px; padding: 32px 36px; }
.timeline-eyebrow { display: flex; align-items: center; gap: 8px; }
.timeline-eyebrow::before { content: ''; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--color-emerald); }
.timeline-summary { border: 0; padding-top: 0; margin-top: 28px; gap: 12px; }
.timeline-summary > div, .timeline-summary > div:first-child { padding: 16px 18px; border: 1px solid var(--timeline-line); border-radius: 12px; background: var(--color-dark); }
.timeline-summary dt { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.timeline-summary dd { line-height: 1.7; }
.timeline-summary > div:first-child { background: var(--surface-highlight); }
.timeline-company-logo { box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.timeline-company h1 { letter-spacing: -.035em; }
.timeline-sort { padding: 5px; border: 1px solid var(--timeline-line); border-radius: 12px; background: var(--color-dark-secondary); }
.timeline-sort label { padding-left: 7px; }
.timeline-sort select { border: 0; background: var(--color-dark); }
.timeline-sort button { border-color: transparent; background: color-mix(in srgb, var(--color-emerald) 10%, transparent); font-weight: 600; }
.stock-search-field { min-height: 58px; border-radius: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.03); }
.stock-card { position: relative; padding: 24px; gap: 0; border-radius: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.02); }
.stock-card:hover, .stock-card:focus-visible { background: var(--surface-highlight); border-color: var(--color-emerald); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.stock-card-top { margin-bottom: 18px; }
.stock-card-top .stock-monogram { width: 48px; height: 48px; font-size: 15px; }
.stock-exchange { letter-spacing: .05em; background: var(--color-dark); }
.stock-card h3 { font-size: 17px; letter-spacing: -.02em; font-weight: 650; }
.stock-symbol { margin-bottom: 24px; font-variant-numeric: tabular-nums; }
.stock-card-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: auto; margin-bottom: 18px; color: var(--text-muted); font-size: 11px; }
.stock-card-stats strong { font-size: 15px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.stock-card-stats time { color: var(--text-primary); }
.stock-card-link { margin-top: 0; border-top-style: solid; }
.stock-card-link > span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--color-emerald) 10%, transparent); }
.timeline-sidebar-inner { box-shadow: 0 4px 18px rgba(0,0,0,.03); }
.timeline-nav-hint { font-size: 11px; color: var(--text-muted); margin-top: 8px; flex-shrink: 0; }
.timeline-date-nav a { transition: background 150ms ease, border-color 150ms ease; }
.timeline-date-nav a[aria-current="location"] { background: color-mix(in srgb, var(--color-emerald) 14%, transparent); border-color: var(--color-emerald); color: var(--hero-stat-value); font-weight: 700; }
.timeline-date-nav a[aria-current="location"] span:last-child { background: var(--color-emerald-dark); color: #fff; }
.timeline-day { margin-top: 36px; border: 1px solid var(--timeline-line); }
.timeline-item { padding: 24px 26px; margin-bottom: 16px; }
.timeline-item h3 { margin-top: 16px; font-size: 18px; line-height: 1.65; }
.timeline-meta time { padding: 5px 8px; border-radius: 6px; background: var(--color-white-5); font-size: 11px; color: var(--text-secondary); }
.timeline-body { font-size: 14px; line-height: 1.9; }
@media (max-width: 640px) {
 .timeline-hero { padding: 24px 20px; }
 .timeline-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .timeline-summary > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
 .timeline-summary > div, .timeline-summary > div:first-child { padding: 12px; }
 .timeline-summary dd { font-size: 12px; }
 .timeline-sort { gap: 4px; }
 .timeline-sort label { font-size: 11px; }
 .timeline-sort select, .timeline-sort button { padding: 8px; }
 .stock-card { padding: 20px; }
 .timeline-item { padding: 18px; }
 .timeline-item h3 { font-size: 16px; }
 .timeline-confidence { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .timeline-date-nav a { transition: none; } }

.timeline-day { scroll-margin-top: var(--timeline-date-offset, 110px); }
@media (max-width: 900px) {
 .timeline-layout { display: block; }
 .timeline-sidebar { position: sticky; top: var(--timeline-mobile-top, 80px); z-index: 30; min-width: 0; margin-bottom: 24px; }
 .timeline-sidebar-inner { display: block; padding: 12px; margin-bottom: 0; border-radius: 12px; background: var(--color-dark); box-shadow: 0 5px 16px rgba(0,0,0,.08); }
 .timeline-nav-hint { display: none; }
 .timeline-date-nav { display: flex; flex-wrap: nowrap; gap: 8px; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; margin: 10px 0 0; padding: 3px 2px 7px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--color-emerald) transparent; }
 .timeline-date-nav a { flex: 0 0 auto; gap: 10px; white-space: nowrap; border-radius: 999px; padding: 8px 14px; }
}

/* Directory browsing and incremental loading. */
.stock-directory .timeline-hero { border-top-width: 1px; border-left: 4px solid var(--color-emerald); }
.stock-directory .timeline-section-heading { padding-bottom: 20px; border-bottom: 1px solid var(--timeline-line); }
.stock-directory .stock-card-stats { padding: 12px; border-radius: 10px; background: var(--color-dark); align-items: center; }
.stock-directory .stock-card-stats strong { color: var(--hero-stat-value); }
.stock-directory .stock-card h3 { line-height: 1.55; }
.stock-directory .stock-card-link { padding-top: 12px; }
.stock-load-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 36px; padding: 28px 20px; border: 1px solid var(--timeline-line); border-radius: 16px; background: var(--color-dark-secondary); text-align: center; }
.stock-load-panel > p { font-size: 12px; color: var(--text-muted); }
.stock-load-panel strong { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.stock-load-progress { width: min(240px, 100%); height: 5px; appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--color-white-10); color: var(--color-emerald); }
.stock-load-progress::-webkit-progress-bar { background: var(--color-white-10); border-radius: 999px; }
.stock-load-progress::-webkit-progress-value { background: var(--color-emerald); border-radius: 999px; }
.stock-load-progress::-moz-progress-bar { background: var(--color-emerald); border-radius: 999px; }
.stock-load-button { display: flex; align-items: center; justify-content: center; gap: 20px; min-width: 220px; min-height: 48px; padding: 12px 24px; background: var(--color-emerald-dark); color: #fff; border: 1px solid transparent; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.stock-load-button:hover { filter: brightness(1.08); }
.stock-load-button:disabled { opacity: .7; cursor: wait; }
.stock-load-status:empty { display: none; }
@media (max-width: 640px) { .stock-load-panel { padding: 24px 16px; } .stock-load-form, .stock-load-button { width: 100%; } }

.timeline-window { margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.timeline-overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 26px 0; }
.timeline-stat { display: flex; flex-direction: column; gap: 7px; padding: 18px; border: 1px solid var(--timeline-line); border-radius: 12px; background: var(--color-dark); }
.timeline-stat dt { font-size: 11px; color: var(--text-muted); }
.timeline-stat dd { order: -1; margin: 0; font-size: 30px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.timeline-stat-total { --stat-color: #c4b5fd; }
.timeline-stat-bullish { --stat-color: var(--sentiment-positive); }
.timeline-stat-neutral { --stat-color: var(--sentiment-neutral); }
.timeline-stat-bearish { --stat-color: var(--sentiment-negative); }
.timeline-stat-active_days { --stat-color: #fcd34d; }
[data-theme="light"] .timeline-stat-total { --stat-color: #6d28d9; }
[data-theme="light"] .timeline-stat-active_days { --stat-color: #92400e; }
.timeline-stat {
    background: linear-gradient(135deg, color-mix(in srgb, var(--stat-color) 20%, var(--color-dark)), color-mix(in srgb, var(--stat-color) 8%, var(--color-dark)));
    border-color: color-mix(in srgb, var(--stat-color) 35%, var(--color-dark));
    border-top: 3px solid var(--stat-color);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--stat-color) 7%, transparent);
}
.timeline-stat dd { color: var(--stat-color); }
.timeline-stat dt { color: var(--text-primary); font-weight: 600; }
.timeline-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding-top: 22px; border-top: 1px solid var(--timeline-line); }
.timeline-filters > div { flex: 1 1 150px; min-width: 0; }
.timeline-filters label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.timeline-filters select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--timeline-line); border-radius: 9px; background: var(--color-dark); color: var(--text-primary); font: inherit; font-size: 13px; }
.timeline-filters button { min-height: 46px; padding: 10px 24px; border: 0; border-radius: 9px; background: var(--color-emerald-dark); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.timeline-filters > a { display: inline-flex; align-items: center; min-height: 46px; font-size: 12px; color: var(--hero-stat-value); }
.timeline-filters select:focus-visible { outline: 3px solid var(--color-emerald); outline-offset: 3px; }
@media (max-width: 640px) {
 .timeline-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
 .timeline-stat:first-child { grid-column: 1 / -1; }
 .timeline-stat { padding: 14px; }
 .timeline-stat dd { font-size: 26px; }
 .timeline-filters > div { flex-basis: 100%; }
 .timeline-filters button { flex: 1; }
}

.stock-timeline [hidden] { display: none !important; }
.timeline-local-search { margin-bottom: 24px; }
.timeline-local-search label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 12px; }
.timeline-local-search-field { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border: 1px solid var(--timeline-line); border-radius: 12px; background: var(--color-dark-secondary); }
.timeline-local-search-field:focus-within { border-color: var(--color-emerald); }
.timeline-local-search-field svg { flex-shrink: 0; color: var(--text-muted); }
.timeline-local-search-field input { min-width: 0; flex: 1; min-height: 40px; background: transparent; border: 0; color: var(--text-primary); font: inherit; font-size: 16px; }
.timeline-local-search-field button { min-height: 40px; padding: 8px; border: 0; border-radius: 6px; background: transparent; color: var(--hero-stat-value); font: inherit; font-size: 12px; cursor: pointer; }
#timeline-search-status { margin-top: 8px; color: var(--text-muted); font-size: 12px; }
#timeline-search-status:empty { display: none; }
.timeline-layout:has(> .timeline-sidebar[hidden]) { grid-template-columns: minmax(0, 1fr); }

.timeline-filters > .timeline-header-search { flex: 2 1 260px; }
.timeline-header-search input { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--timeline-line); border-radius: 9px; background: var(--color-dark); color: var(--text-primary); font: inherit; font-size: 14px; }
.timeline-filters > #timeline-search-status { flex-basis: 100%; margin: 0; }
@media (max-width: 640px) { .timeline-filters > .timeline-header-search { flex-basis: 100%; } .timeline-header-search input { font-size: 16px; } }
