/* ── Ticket Comparison ──
 * Scoped styles extracted from the inline `style=` attributes and per-page
 * <style> blocks of app/views/tools/ticket_comparison/*.
 * Page roots: .tc-container (index), .tc-show (show).
 * Streamed broadcast partials (_thinking, _tool_result, _stream_done, …) render
 * inside .tc-show, so their rules are scoped under it.
 * Genuinely data-driven values (bar widths, label colours computed in Ruby)
 * remain inline in the Haml — they cannot live in a static stylesheet.
 */

/* ── Shared page chrome (both pages set this on <body> via the layout) ── */
body:has(.tc-container), body:has(.tc-show) {
  margin: 0; min-height: 100dvh; font-family: system-ui, sans-serif; background: #f5f5f5;
}

/* ── Streamed broadcast partials (inside .tc-show) ── */
.tc-show .event-thinking > summary { cursor: pointer; color: #9ca3af; font-size: 0.7rem; }
.tc-show .event-thinking .event-content {
  font-size: 0.75rem; color: #6b7280; white-space: pre-wrap; padding: 0.5rem 0;
}
.tc-tool-result-text { color: #6b7280; font-size: 0.75rem; }
.tc-stream-done__label { font-size: 0.85rem; color: #059669; font-weight: 600; margin: 0 0 0.5rem; }
.tc-stream-done__link  { font-size: 0.8rem; color: #0891b2; }

/* ── _comparison_section ── */
.tc-cmp { background: #fff; border-radius: 0.75rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-top: 1.5rem; overflow: hidden; }
.tc-cmp-header { padding: 0.875rem 1.25rem; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; }
.tc-cmp-title { margin: 0; font-size: 1rem; color: #111827; }
.tc-cmp-badge { padding: 0.2rem 0.6rem; border-radius: 1rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.tc-cmp-badge--judging { background: #fef3c7; color: #92400e; }
.tc-cmp-badge--done    { background: #e5eced; color: #2d4350; }
.tc-cmp-body { padding: 1.25rem; }
.tc-cmp-running-note { font-size: 0.8rem; color: #6b7280; margin: 0 0 0.75rem; }
.tc-cmp-stream-wrap { background: #f9fafb; border-radius: 0.5rem; min-height: 3rem; overflow: auto; max-height: 300px; }
.tc-cmp-stream { white-space: pre-wrap; font-size: 0.8rem; color: #374151; margin: 0; padding: 0.75rem; }
.tc-cmp-ranking { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; }
.tc-cmp-section-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; }
.tc-cmp-rank-badge { padding: 0.3rem 0.75rem; border-radius: 1rem; font-size: 0.8rem; font-weight: 700; }
.tc-cmp-scores-grid { display: grid; gap: 1rem; margin-bottom: 1.25rem; }
.tc-cmp-score-card { background: #f9fafb; border-radius: 0.5rem; padding: 0.875rem; }
.tc-cmp-score-name { font-weight: 700; font-size: 0.875rem; color: #111827; margin-bottom: 0.6rem; }
.tc-cmp-score-total { font-family: monospace; font-weight: 400; color: #6b7280; }
.tc-cmp-gate-table { width: 100%; font-size: 0.75rem; border-collapse: collapse; }
.tc-cmp-gate-label { padding: 0.15rem 0.4rem 0.15rem 0; color: #6b7280; }
.tc-cmp-gate-value { padding: 0.15rem 0; font-family: monospace; font-weight: 600; color: #111827; }
.tc-cmp-issues { margin-top: 0.5rem; }
.tc-cmp-issue { display: inline-block; background: #fee2e2; color: #991b1b; font-size: 0.7rem; padding: 0.15rem 0.4rem; border-radius: 0.3rem; margin: 0.1rem 0.1rem 0 0; }
.tc-cmp-improvements { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.75rem; color: #374151; }
.tc-cmp-improvement { margin-bottom: 0.2rem; }
.tc-cmp-summary { font-size: 0.875rem; color: #374151; line-height: 1.6; margin-bottom: 0.75rem; border-left: 3px solid #e5e7eb; padding-left: 0.75rem; }
.tc-cmp-learnings-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; margin-bottom: 0.3rem; }
.tc-cmp-learnings { margin: 0; padding-left: 1.25rem; font-size: 0.8rem; color: #374151; line-height: 1.6; }
.tc-cmp-error { background: #fee2e2; color: #991b1b; border-radius: 0.5rem; padding: 0.75rem; font-size: 0.8rem; font-family: monospace; }

/* ── _lea_stats (currently not rendered; kept in sync) ── */
.tc-stats-card { background: #fff; border-radius: 0.75rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.tc-stats-head { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1.25rem; }
.tc-stats-title { font-size: 1rem; font-weight: 700; color: #111827; }
.tc-stats-count { font-size: 0.75rem; color: #9ca3af; font-family: monospace; }
.tc-stats-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.tc-stats-col--lea   { border-left: 3px solid #10b981; padding-left: 1rem; }
.tc-stats-col--lucas { border-left: 3px solid #5a7280; padding-left: 1rem; }
.tc-stats-col-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.75rem; }
.tc-stats-col-label--lea   { color: #10b981; }
.tc-stats-col-label--lucas { color: #5a7280; }
.tc-stats-avg { margin-bottom: 0.75rem; }
.tc-stats-avg-num { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.tc-stats-avg-num--lea   { color: #10b981; }
.tc-stats-avg-num--lucas { color: #5a7280; }
.tc-stats-avg-den { font-size: 0.75rem; color: #9ca3af; }
.tc-stats-rank { font-size: 0.8rem; color: #374151; margin-bottom: 0.75rem; }
.tc-stats-rank-pct { font-weight: 700; }
.tc-stats-rank-pct--lea   { color: #10b981; }
.tc-stats-rank-pct--lucas { color: #5a7280; }
.tc-stats-rank-frac { color: #9ca3af; font-size: 0.75rem; }
.tc-stats-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tc-stats-pill { font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 0.3rem; }
.tc-stats-gates { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid #f3f4f6; }
.tc-stats-gates-label { font-size: 0.7rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.6rem; }
.tc-stats-gate-rows { display: flex; flex-direction: column; gap: 0.45rem; }
.tc-stats-gate-row { display: grid; grid-template-columns: 7.5rem 1fr 2.5rem 1fr 2.5rem; align-items: center; gap: 0.5rem; font-size: 0.75rem; }
.tc-stats-gate-name { color: #6b7280; }
.tc-stats-bar { height: 7px; background: #f3f4f6; border-radius: 3px; overflow: hidden; }
.tc-stats-bar-fill { height: 100%; border-radius: 3px; }
.tc-stats-bar-fill--lea   { background: #10b981; }
.tc-stats-bar-fill--lucas { background: #5a7280; }
.tc-stats-gate-pct { font-family: monospace; font-weight: 700; text-align: right; }
.tc-stats-legend { display: flex; gap: 1rem; margin-top: 0.5rem; font-size: 0.7rem; color: #9ca3af; }
.tc-stats-legend-sq--lea   { color: #10b981; font-weight: 700; }
.tc-stats-legend-sq--lucas { color: #5a7280; font-weight: 700; }
.tc-stats-legend-note { margin-left: auto; }

/* ── _ticket_card (session-card/judge-* base styles live in the index section) ── */
.tc-card-id { display: flex; flex-direction: column; gap: 0.1rem; }
.tc-card-lea-ts { font-size: 0.65rem; color: #6b7280; font-weight: 400; }
.tc-card-status-wrap { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.tc-card-badge--amber { background: #fef3c7; color: #92400e; }
.tc-card-subject { font-weight: 600; color: #111827; margin-bottom: 0.5rem; }
.tc-card-meta { font-size: 0.8rem; color: #6b7280; margin-bottom: 0.5rem; font-family: monospace; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.tc-card-sep { color: #9ca3af; }
.tc-card-topcase { background: #dbeafe; color: #1e40af; font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 0.3rem; font-family: system-ui; }
.tc-card-auto { background: #d1fae5; color: #065f46; font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 0.3rem; font-family: system-ui; }
.tc-card-judge-summary { font-size: 0.7rem; color: #6b7280; align-self: center; margin-left: 0.2rem; }
.tc-card-body { font-size: 0.8rem; color: #4b5563; margin-bottom: 1rem; line-height: 1.5; }
.tc-card-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.tc-card-detail-link { font-size: 0.875rem; color: #465A64; text-decoration: none; font-weight: 500; }
.tc-card-run-btn { margin-left: auto; padding: 0.35rem 0.85rem; background: #465A64; color: #fff; border: none; border-radius: 0.5rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.tc-card-compare-btn { padding: 0.35rem 0.85rem; background: #7c3aed; color: #fff; border: none; border-radius: 0.5rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.tc-ml-auto { margin-left: auto; }
.tc-card-processing { margin-left: auto; font-size: 0.8rem; color: #065f46; }
.tc-card-judging { margin-left: auto; font-size: 0.8rem; color: #7c3aed; }
.tc-card-gorgias-ok { font-size: 0.75rem; color: #10b981; font-weight: 600; }
.tc-card-gorgias-btn { padding: 0.25rem 0.6rem; background: #0891b2; color: #fff; border: none; border-radius: 0.4rem; font-size: 0.75rem; font-weight: 600; cursor: pointer; }

/* ── index (was the page <style> block; scoped under .tc-container) ── */
.tc-container { max-width: 1400px; margin: 0 auto; padding: 2rem 1rem; }
.tc-container .tc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.tc-container .tc-header h1 { margin: 0; font-size: 2rem; color: #111827; }
.tc-header-note { color: #9ca3af; font-size: 0.8rem; }
.tc-container .tc-filters { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.tc-container .tc-filter-btn { padding: 0.35rem 0.85rem; border-radius: 1rem; font-size: 0.8rem; font-weight: 600; text-decoration: none; border: 1.5px solid #e5e7eb; background: #fff; color: #6b7280; transition: all 0.15s; cursor: pointer; font-family: inherit; }
.tc-container .tc-filter-btn:hover { border-color: #9ca3af; color: #374151; }
.tc-container .tc-filter-btn--active { border-color: transparent; color: #fff; }
.tc-container .tc-filter-btn--new.tc-filter-btn--active         { background: #6b7280; }
.tc-container .tc-filter-btn--lea.tc-filter-btn--active         { background: #10b981; }
.tc-container .tc-filter-btn--human.tc-filter-btn--active       { background: #d97706; }
.tc-container .tc-filter-btn--lucas.tc-filter-btn--active       { background: #5a7280; }
.tc-container .tc-filter-btn--all.tc-filter-btn--active         { background: #7c3aed; }
.tc-container .tc-filter-btn--judged.tc-filter-btn--active      { background: #0891b2; }
.tc-container .tc-filter-btn--judgeable.tc-filter-btn--active   { background: #7c3aed; border-style: dashed; }
.tc-container .tc-filter-btn--autonomous.tc-filter-btn--active  { background: #1e40af; }
.tc-container .tc-filter-btn--attachments.tc-filter-btn--active { background: #92400e; }
.tc-container .tc-facet-filters { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; padding: 0.6rem 0.8rem; background: #fff; border-radius: 0.5rem; border: 1.5px solid #e5e7eb; }
.tc-container .tc-facet-select { padding: 0.3rem 0.6rem; border: 1.5px solid #e5e7eb; border-radius: 0.4rem; font-size: 0.8rem; color: #374151; background: #fff; cursor: pointer; font-family: inherit; }
.tc-container .tc-date-label { font-size: 0.75rem; color: #6b7280; display: flex; align-items: center; gap: 0.3rem; }
.tc-container .tc-date-input { padding: 0.25rem 0.5rem; border: 1.5px solid #e5e7eb; border-radius: 0.4rem; font-size: 0.8rem; font-family: inherit; }
.tc-reset-link { font-size: 0.8rem; color: #9ca3af; text-decoration: none; margin-left: auto; white-space: nowrap; }
.tc-container .sessions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1.25rem; }
.tc-container .session-card { background: #fff; border-radius: 0.75rem; padding: 1.25rem; border-left: 4px solid #d1d5db; box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: all 0.2s ease; }
.tc-container .session-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.tc-container .session-card--active { border-left-color: #10b981; }
.tc-container .session-card--active::before { content: ""; display: block; height: 2px; background: linear-gradient(90deg, transparent, #10b981, transparent); background-size: 200% 100%; animation: tc-shimmer 2s linear infinite; margin: -1.25rem -1.25rem 1rem -1.25rem; border-radius: 0.75rem 0.75rem 0 0; }
@keyframes tc-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.tc-container .session-card--completed { border-left-color: #5a7280; }
.tc-container .session-card--judged    { border-left-color: #0891b2; }
.tc-container .session-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.6rem; }
.tc-container .session-id { font-family: monospace; font-size: 0.8rem; color: #9ca3af; }
.tc-container .session-status { padding: 0.2rem 0.6rem; border-radius: 1rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.tc-container .status-active    { background: #d1fae5; color: #065f46; }
.tc-container .status-completed { background: #e5eced; color: #2d4350; }
.tc-container .session-prompt { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tc-container .judge-bar { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.6rem; padding: 0.5rem 0.6rem; background: #f0f9ff; border-radius: 0.4rem; border-left: 3px solid #0891b2; }
.tc-container .judge-chip { font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.45rem; border-radius: 0.3rem; }
.tc-container .judge-chip--excellent { background: #d1fae5; color: #065f46; }
.tc-container .judge-chip--good      { background: #e5eced; color: #2d4350; }
.tc-container .judge-chip--ok        { background: #fef3c7; color: #92400e; }
.tc-container .judge-chip--poor      { background: #fee2e2; color: #991b1b; }
.tc-container .judge-chip--default   { background: #f3f4f6; color: #374151; }
.tc-container turbo-frame#tc-results { display: block; position: relative; transition: opacity 0.15s; }
.tc-container turbo-frame#tc-results[busy] { opacity: 0.4; pointer-events: none; }
.tc-container turbo-frame#tc-results[busy]::after { content: ""; position: absolute; top: 3rem; left: 50%; transform: translateX(-50%); width: 1.5rem; height: 1.5rem; border: 2px solid #e5e7eb; border-top-color: #6b7280; border-radius: 50%; animation: tc-spin 0.6s linear infinite; }
@keyframes tc-spin { to { transform: translateX(-50%) rotate(360deg); } }
.tc-container .tc-pagination { display: flex; justify-content: center; margin-top: 1.5rem; }
.tc-container .tc-pagination nav.pagy { position: static; top: auto; left: auto; right: auto; z-index: auto; background: none; padding: 0; border-radius: 0; display: flex; gap: 0.3rem; }
.tc-container .tc-pagination nav.pagy a, .tc-container .tc-pagination nav.pagy span { padding: 0.3rem 0.7rem; border-radius: 0.4rem; font-size: 0.8rem; font-weight: 600; border: 1.5px solid #e5e7eb; background: #fff; color: #374151; text-decoration: none; }
.tc-container .tc-pagination nav.pagy .current { background: #6b7280; color: #fff; border-color: transparent; }
.tc-container .tc-pagination nav.pagy .gap, .tc-container .tc-pagination nav.pagy [aria-disabled="true"]:not(.current) { color: #9ca3af; }
.tc-container .tc-search-wrap { position: relative; margin-bottom: 0.6rem; }
.tc-container .tc-search-input { width: 100%; box-sizing: border-box; padding: 0.55rem 2.5rem 0.55rem 2.25rem; border: 1.5px solid #e5e7eb; border-radius: 0.5rem; font-size: 0.875rem; font-family: inherit; color: #111827; background: #fff; outline: none; transition: border-color 0.15s; }
.tc-container .tc-search-input:focus { border-color: #6b7280; }
.tc-container .tc-search-input::placeholder { color: #9ca3af; }
.tc-container .tc-search-icon { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 0.9rem; pointer-events: none; user-select: none; }
.tc-container .tc-search-clear { position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 1rem; text-decoration: none; line-height: 1; cursor: pointer; display: flex; align-items: center; }
.tc-container .tc-search-clear:hover { color: #374151; }
@media (max-width: 768px) { .tc-container .sessions-grid { grid-template-columns: 1fr; } }

/* ── show (was the page <style> block; scoped under .tc-show) ── */
.tc-show { max-width: 1600px; margin: 0 auto; padding: 2rem 1rem; }
.tc-show .back-link { display: inline-flex; align-items: center; gap: 0.4rem; color: #6b7280; text-decoration: none; font-size: 0.875rem; margin-bottom: 1.25rem; transition: color 0.15s; }
.tc-show .back-link:hover { color: #111827; }
.tc-show .back-link.tc-back-link--flush { margin-bottom: 0; }
.tc-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.5rem; }
.tc-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.tc-btn-reprocess { padding: 0.35rem 0.8rem; background: #6b7280; color: #fff; border: none; border-radius: 0.5rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.tc-btn-remove { padding: 0.35rem 0.8rem; background: #dc2626; color: #fff; border: none; border-radius: 0.5rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.tc-btn-sync { padding: 0.35rem 0.8rem; background: #0891b2; color: #fff; border: none; border-radius: 0.5rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.tc-gorgias-synced { font-size: 0.8rem; color: #10b981; font-weight: 600; white-space: nowrap; }
.tc-gorgias-time { color: #9ca3af; font-weight: 400; }
.tc-notice { background: #d1fae5; color: #065f46; border-radius: 0.5rem; padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.875rem; font-weight: 500; }
.tc-show .tc-title-card { background: #fff; border-radius: 0.75rem; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.tc-show .tc-title-card h1 { margin: 0 0 0.5rem; font-size: 1.25rem; color: #111827; }
.tc-show .tc-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.8rem; color: #6b7280; }
.tc-show .tc-meta span { display: flex; align-items: center; gap: 0.3rem; }
.tc-gorgias-link { color: #0891b2; text-decoration: none; }
.tc-meta-topcase { background: #dbeafe; color: #1e40af; font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 0.3rem; font-size: 0.75rem; }
.tc-show .tc-ticket-body { background: #f9fafb; border-radius: 0.5rem; padding: 1rem 1.25rem; font-size: 0.875rem; color: #374151; line-height: 1.6; margin-top: 0.75rem; white-space: pre-wrap; word-break: break-word; }
.tc-show .tc-columns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 1024px) { .tc-show .tc-columns { grid-template-columns: 1fr; } }
.tc-show .tc-col { background: #fff; border-radius: 0.75rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden; }
.tc-show .tc-col-header { padding: 0.875rem 1.25rem; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; }
.tc-show .tc-col-header h2 { margin: 0; font-size: 1rem; color: #111827; }
.tc-show .tc-col-body { padding: 1.25rem; }
.tc-show .tc-answer { font-size: 0.875rem; line-height: 1.7; color: #374151; border-bottom: 1px solid #f3f4f6; padding-bottom: 1rem; margin-bottom: 1rem; }
.tc-show .tc-no-answer { font-size: 0.875rem; color: #9ca3af; font-style: italic; padding: 2rem 0; text-align: center; }
.tc-show .tc-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.tc-show .tc-stat { background: #f3f4f6; border-radius: 0.4rem; padding: 0.25rem 0.6rem; font-size: 0.75rem; color: #374151; font-family: monospace; font-weight: 600; }
.tc-show .tc-stat--good { background: #d1fae5; color: #065f46; }
.tc-show .tc-stat--warn { background: #fef3c7; color: #92400e; }
.tc-show .tc-stat--bad  { background: #fee2e2; color: #991b1b; }
.tc-show .tc-stat--topcase { background: #dbeafe; color: #1e40af; }
.tc-show .tc-outputs-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; margin: 0.75rem 0 0.4rem; }
.tc-show .run-form button { width: 100%; padding: 0.75rem; background: #465A64; color: #fff; border: none; border-radius: 0.5rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.tc-show .run-form button:hover { background: #1d4ed8; }
.tc-run-hint { font-size: 0.75rem; color: #9ca3af; margin-top: 0.5rem; text-align: center; }
.tc-show .compare-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1.1rem; background: #7c3aed; color: #fff; border: none; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.tc-show .compare-btn:hover { background: #6d28d9; }
.tc-show .tc-answer h1, .tc-show .tc-answer h2, .tc-show .tc-answer h3 { font-size: 1em; margin: 0.5em 0 0.25em; }
.tc-show .tc-answer ul, .tc-show .tc-answer ol { margin: 0.25em 0; padding-left: 1.25em; }
.tc-show .tc-answer p { margin: 0 0 0.5em; }
.tc-show .tc-answer strong { font-weight: 700; }
.tc-show .tc-report-block { margin-top: 1rem; border-top: 2px solid #e5e7eb; padding-top: 0.875rem; }
.tc-show .tc-report-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #9ca3af; margin-bottom: 0.5rem; }
.tc-show .tc-agent-report { font-size: 0.8rem; line-height: 1.65; color: #374151; background: #f9fafb; border-radius: 0.5rem; padding: 0.875rem 1rem; }
.tc-show .tc-agent-report h1, .tc-show .tc-agent-report h2 { font-size: 0.85rem; font-weight: 700; color: #111827; margin: 0.75em 0 0.25em; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.2em; }
.tc-show .tc-agent-report h3 { font-size: 0.8rem; font-weight: 700; margin: 0.5em 0 0.2em; }
.tc-show .tc-agent-report ul, .tc-show .tc-agent-report ol { margin: 0.2em 0; padding-left: 1.25em; }
.tc-show .tc-agent-report li { margin-bottom: 0.15em; }
.tc-show .tc-agent-report p { margin: 0 0 0.4em; }
.tc-show .tc-agent-report strong { font-weight: 700; }
.tc-show .tc-agent-report table { width: 100%; border-collapse: collapse; font-size: 0.78rem; margin: 0.5em 0; }
.tc-show .tc-agent-report th { background: #e5e7eb; font-weight: 700; padding: 0.3rem 0.5rem; text-align: left; }
.tc-show .tc-agent-report td { padding: 0.25rem 0.5rem; border-bottom: 1px solid #e5e7eb; }
.tc-show .tc-agent-report code { background: #e5e7eb; padding: 0.1em 0.3em; border-radius: 0.2em; font-size: 0.9em; }
/* research_knowledge block (dynamic badge colours computed in Ruby stay inline) */
.tc-show .tc-research { font-size: 0.8rem; background: #f9fafb; border-radius: 0.5rem; padding: 0.875rem 1rem; }
.tc-show .tc-research-row { margin-bottom: 0.55rem; }
.tc-show .tc-research-key { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; display: block; margin-bottom: 0.2rem; }
.tc-show .tc-research-nil { color: #d1d5db; }
.tc-show .tc-research-badge { font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 0.3rem; }
.tc-show .tc-research-text { color: #374151; }
.tc-show .tc-research-list { margin: 0; padding-left: 1.1rem; color: #374151; }
.tc-show .tc-research-item { margin-bottom: 0.2rem; }
.tc-show .tc-research-item--sm { margin-bottom: 0.15rem; }
.tc-show .tc-attachments { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.75rem; }
.tc-show .tc-attachments button { background: none; border: 1.5px solid #e5e7eb; padding: 0; border-radius: 0.4rem; overflow: hidden; cursor: zoom-in; transition: border-color 0.15s; }
.tc-show .tc-attachments button:hover { border-color: #9ca3af; }
.tc-show .tc-attachments img { display: block; max-height: 480px; max-width: 780px; object-fit: contain; background: #f9fafb; }
.tc-show .tc-live-stream { padding: 0.75rem 0; }
.tc-show .tc-live-header { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 600; color: #059669; margin-bottom: 0.5rem; }
.tc-show .tc-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: tc-pulse 1.5s ease-in-out infinite; }
@keyframes tc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.tc-show .tc-messages { font-size: 0.8rem; }
.tc-show .session-status { padding: 0.2rem 0.6rem; border-radius: 1rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.tc-show .status-active    { background: #d1fae5; color: #065f46; }
.tc-show .status-completed { background: #e5eced; color: #2d4350; }
.tc-badge--amber { background: #fef3c7; color: #92400e; }
.tc-badge--grey  { background: #f3f4f6; color: #9ca3af; }
