.comment-spikes { width: 100%; max-width: 850px; margin: 0 auto; padding: 20px; color: #26384a; font: 16px/1.5 'Segoe UI', Tahoma, sans-serif; box-sizing: border-box; }
.comment-spikes-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.comment-spikes h1 { margin: 0; color: #284d70; font-size: clamp(22px, 4vw, 30px); line-height: 1.2; }
.comment-spikes-heading button { flex-shrink: 0; padding: 7px 12px; border: 1px solid #bacbd9; border-radius: 6px; background: #fff; color: #315f89; font: inherit; font-size: 14px; cursor: pointer; }
.comment-spikes-heading button:disabled { opacity: .5; cursor: wait; }
.comment-spikes-intro { margin: 16px 0 22px; color: #5b6b79; }
.comment-spikes-status { margin: 16px 0; }
.comment-spikes-status:empty { display: none; }
.comment-spikes-status[data-loading="true"] { color: #58799a; font-style: italic; text-align: center; }
.comment-spikes-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.comment-spikes-list li { position: relative; display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.comment-spikes-list a { color: #274e71; text-decoration: none; }
.comment-spikes-list a:hover { text-decoration: underline; }
.comment-spikes-list a:focus-visible, .comment-spikes button:focus-visible { outline: 2px solid #31689b; outline-offset: 3px; }
.comment-spikes-video { min-width: 0; padding: 10px; border-radius: 10px 0 10px 10px; background: #d9d9d9; transition: background-color .2s; }
.comment-spikes-list li:hover .comment-spikes-video { background: #c2c2c2; }
.comment-spikes-thumbnail { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 3px; overflow: hidden; background: #b6bcc3; }
.comment-spikes-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.comment-spikes-duration { position: absolute; bottom: 5px; right: 5px; padding: 1px 4px; background: #000b; color: #fff; border-radius: 2px; font-size: 12px; line-height: 18px; font-variant-numeric: tabular-nums; }
.comment-spikes-video-title { display: block; margin-top: 7px; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; line-height: 1.35; }
.comment-spikes-channel { margin: 4px 0 0; font-size: 12px; line-height: 1.4; color: #56616b; overflow-wrap: anywhere; }
.comment-spikes-details { align-self: stretch; min-width: 0; display: flex; flex-direction: column; }
.comment-spikes-timeline { display: flex; align-items: center; gap: 10px; min-height: 22px; padding: 0 10px; background: #d9d9d9; border-radius: 0 4px 4px 0; }
.comment-spikes-list li:hover .comment-spikes-timeline { background: #c2c2c2; }
.comment-spikes-timeline-time { flex: 0 0 auto; color: #496171; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.comment-spikes-track { flex: 1 1 auto; min-width: 24px; position: relative; height: 22px; margin-inline: 5px; }
.comment-spikes-timeline-marker { position: absolute; top: 50%; width: 10px; height: 10px; transform: translate(-50%, -50%); background: #31689b; border: 1px solid #fff; border-radius: 1px; z-index: 1; }
.comment-spikes-track[data-scaled="false"] { display: flex; align-items: center; gap: 5px; }
.comment-spikes-track[data-scaled="false"] .comment-spikes-timeline-marker { position: relative; top: auto; transform: none; }
.comment-spikes-timeline-marker[data-highlighted="true"] { background: #d26a19; outline: 2px solid #d26a1966; outline-offset: 2px; z-index: 2; }
.comment-spikes-line[data-highlighted="true"] { background: #fff0dd; border-radius: 3px; }
.comment-spikes-rank[data-highlighted="true"] { color: #fff; background: #d26a19; border-color: #d26a19; }
.comment-spikes-range { display: inline-block; flex-shrink: 0; white-space: nowrap; padding: 0 4px; border-radius: 3px; background: #e6eef6; font: 13px/1.5 Consolas, "SFMono-Regular", Menlo, monospace; font-variant-numeric: tabular-nums; }
.comment-spikes-lines { display: grid; gap: 10px; overflow-x: auto; margin: 12px 10px; }
.comment-spikes-line { display: flex; align-items: center; gap: 9px; min-width: max-content; white-space: nowrap; }
.comment-spikes-rank { flex: 0 0 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid #b8c9d7; border-radius: 2px; color: #7794ad; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.comment-spikes-metrics { color: #3e566a; font-size: 14px; }
.comment-spikes-video-stats { margin: auto 10px 8px; padding-top: 8px; color: #788590; font-size: 13px; }
.comment-spikes-video-stats:empty { display: none; }
.comment-spikes-note { margin: 22px 0 0; color: #788590; font-size: 14px; }


@media (max-width: 540px) { .comment-spikes { padding: 16px 10px; } .comment-spikes-list li { grid-template-columns: 196px minmax(0, 1fr); } .comment-spikes-video { padding: 6px; } .comment-spikes-video-title { font-size: 13px; } }
@media (max-width: 360px) { .comment-spikes-list li { grid-template-columns: 160px minmax(0, 1fr); } }

.comment-spikes-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.comment-spikes-heading .comment-spikes-layout-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 6px; }
.comment-spikes-layout-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.comment-spikes-layout-button[aria-pressed="true"] { background: #e6eef6; border-color: #31689b; color: #234d74; }
.comment-spikes-list .comment-spikes-range:hover,
.comment-spikes-list .comment-spikes-range:focus-visible,
.comment-spikes-line[data-highlighted="true"] .comment-spikes-range,
.comment-spikes-line:is(:hover, :focus-within) .comment-spikes-range,
.comment-spikes-single:is(:hover, :focus-within) .comment-spikes-range { background: #31689b; color: #fff; text-decoration: none; }
.comment-spikes[data-spike-layout="list"] .comment-spikes-list { padding-left: 110px; gap: 10px; }
.comment-spikes[data-spike-layout="list"] li.comment-spikes-single { display: block; padding: 12px; border: 1px solid #dce4eb; border-radius: 6px; background: #f8fafc; overflow-x: auto; }
.comment-spikes-single:hover, .comment-spikes-single:focus-within { background: #edf3f9 !important; }
.comment-spikes-single-title { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.comment-spikes-hover-preview { position: fixed; top: 0; left: 0; width: 220px; padding: 7px; border: 1px solid #c2cfda; border-radius: 6px; background: #fff; box-shadow: 0 5px 20px #19354b26; z-index: 900; pointer-events: none; transition: transform 220ms ease; box-sizing: border-box; }
.comment-spikes-hover-preview[hidden] { display: none; }
.comment-spikes-hover-preview img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; }
.comment-spikes-hover-preview p { margin: 6px 0 0; font-size: 12px; line-height: 1.4; max-height: 3em; overflow: hidden; color: #496171; }
@media (max-width: 620px) { .comment-spikes-heading { flex-wrap: wrap; } .comment-spikes[data-spike-layout="list"] .comment-spikes-list { padding-left: 72px; } .comment-spikes-hover-preview { width: 144px; padding: 5px; } }
@media (prefers-reduced-motion: reduce) { .comment-spikes-hover-preview { transition: none; } }


.comment-spikes-summary { margin: -10px 0 4px 0; padding: 4px 10px; box-sizing: border-box; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; max-height: calc(4.5em + 8px); font-size: 14px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; color: #5b6b79; }
.comment-spikes-single > .comment-spikes-summary { margin-top: 0; }

.comment-spikes-summary { transition: color 150ms ease; }
.comment-spikes-line[data-highlighted="true"] + .comment-spikes-summary,
.comment-spikes-line:is(:hover, :focus-within) + .comment-spikes-summary,
.comment-spikes-single:is(:hover, :focus-within) > .comment-spikes-summary,
.comment-spikes-summary:hover { color: #1f4f7a; background: #fff0dd; border-radius: 3px; }

.comment-spikes-privacy { margin: 24px 20px; padding-top: 18px; border-top: 1px solid #d9dfe5; color: #6b7783; font-size: 13px; line-height: 1.6; }
.comment-spikes-privacy h2 { margin: 0 0 8px; color: #496171; font-size: 15px; }
.comment-spikes-privacy p { margin: 0 0 10px; }
.comment-spikes-privacy a { color: #31689b; }

.comment-spikes-local-actions { display: inline-flex; gap: 5px; margin-left: 8px; vertical-align: middle; }
.comment-spikes-local-actions button { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 4px; border: 0; background: transparent; color: #8295a4; cursor: pointer; }
.comment-spikes-local-actions button:hover:not(:disabled), .comment-spikes-local-actions button:focus-visible:not(:disabled) { color: #234d74; }
.comment-spikes-local-actions button:disabled { color: #c2cbd2; cursor: default; }
.comment-spikes-local-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.comment-spikes-local-actions svg.open-w-right { width: 14px; height: 14px; }

/* Give action icons room, including the website's outer content column. */
main:has(> .comment-spikes[data-spike-actions="true"]) { max-width: 1000px; }
.comment-spikes[data-spike-actions="true"] { max-width: 1000px; }
.comment-spikes[data-spike-actions="true"] .comment-spikes-lines { min-width: 0; overflow-x: visible; }
.comment-spikes[data-spike-actions="true"] .comment-spikes-line { min-width: 0; flex-wrap: wrap; white-space: normal; }
.comment-spikes[data-spike-actions="true"] .comment-spikes-metrics { flex: 1 1 220px; white-space: normal; }
.comment-spikes-local-actions { flex-shrink: 0; }
.comment-spikes[data-spike-actions="true"][data-spike-layout="list"] li.comment-spikes-single { min-width: 0; overflow-x: visible; }
.comment-spikes[data-spike-actions="true"] .comment-spikes-single-title { overflow-wrap: anywhere; }
@media (max-width: 900px) {
    .comment-spikes[data-spike-actions="true"] .comment-spikes-list li { grid-template-columns: minmax(160px, 28%) minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .comment-spikes[data-spike-actions="true"] .comment-spikes-list li { grid-template-columns: minmax(0, 1fr); }
}
