:root {
    --bg-primary: #1a1b26;
    --bg-secondary: #24283b;
    --bg-tertiary: #292e42;
    --text-primary: #c0caf5;
    --text-secondary: #9aa5ce;
    --text-muted: #565f89;
    --accent-cyan: #7dcfff;
    --accent-green: #9ece6a;
    --accent-yellow: #e0af68;
    --accent-red: #f7768e;
    --accent-purple: #bb9af7;
    --border-color: #3b4261;
}

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

/* Utility classes */
.hidden { display: none !important; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 2rem;
}

.container { max-width: 1200px; margin: 0 auto; }

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Error */
.error-container {
    text-align: center;
    padding: 3rem;
    color: var(--accent-red);
}

.error-container h2 {
    margin-bottom: 1rem;
}

.error-container .link {
    color: var(--accent-cyan);
    text-decoration: none;
    margin-top: 1rem;
    display: inline-block;
}

.error-container .link:hover {
    text-decoration: underline;
}

/* Session Header */
.session-header {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.meta-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-label { color: var(--text-muted); }
.meta-value { color: var(--accent-cyan); font-weight: 500; }

.winner-badge {
    background: var(--accent-green);
    color: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.stat-card[title] {
    cursor: help;
}

/* Glossary */
.glossary-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.glossary-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.glossary-icon {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.glossary.open + .glossary-toggle .glossary-icon,
.glossary-toggle:has(+ .glossary.open) .glossary-icon {
    transform: rotate(90deg);
}

.glossary {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}

.glossary.open {
    display: block;
}

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

.glossary-item {
    padding: 0.5rem 0;
}

.glossary-item dt {
    font-weight: 600;
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.glossary-item dd {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* Sections */
.section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Agent Cards */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.agent-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.agent-card.winner {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 1px var(--accent-green);
}

.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.agent-id {
    font-weight: 600;
    font-size: 1rem;
}

.agent-model {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    display: inline-block;
}

.agent-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    font-size: 0.85rem;
}

.agent-stat {
    display: flex;
    justify-content: space-between;
}

.agent-stat-label { color: var(--text-muted); }
.agent-stat-value { color: var(--text-secondary); }

/* Tools */
.tool-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tool-name {
    min-width: 280px;
    max-width: 400px;
    color: var(--text-secondary);
    word-break: break-all;
    flex-shrink: 0;
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.8rem;
}

.tool-bar-container {
    flex: 1;
    min-width: 150px;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.tool-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.tool-stats {
    min-width: 120px;
    text-align: right;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Coordination Graph - Vertical Timeline with Agent Columns */
.timeline {
    position: relative;
}

.timeline-vertical-container {
    position: relative;
    overflow-y: auto;
    max-height: 600px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.timeline-svg {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.timeline-vertical {
    position: relative;
    z-index: 2;
}

.timeline-header {
    display: flex;
    position: sticky;
    top: 0;
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
    z-index: 10;
}

.timeline-time-col {
    min-width: 80px;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.timeline-agent-col {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-align: center;
    border-left: 1px solid var(--border-color);
}

.timeline-body {
    display: flex;
    flex-direction: column;
}

.timeline-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    min-height: 70px;
}

.timeline-row:last-child {
    border-bottom: none;
}

.timeline-row .timeline-time-col {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
}

.timeline-cell {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-left: 1px solid var(--border-color);
}

.timeline-cell.empty {
    background: transparent;
}

.timeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.timeline-node:hover {
    transform: scale(1.05);
}

.timeline-node.clickable {
    cursor: pointer;
}

.timeline-node.clickable:active {
    transform: scale(0.98);
}

/* Highlight flash animation for navigation */
@keyframes highlightFlash {
    0% { box-shadow: 0 0 0 0 rgba(125, 207, 255, 0.7); }
    50% { box-shadow: 0 0 20px 5px rgba(125, 207, 255, 0.5); }
    100% { box-shadow: 0 0 0 0 rgba(125, 207, 255, 0); }
}

.highlight-flash {
    animation: highlightFlash 1s ease-out 2;
}

.answer-collapsible.highlight-flash,
.vote-collapsible.highlight-flash {
    border-color: var(--accent-cyan) !important;
}

.final-answer-section.highlight-flash {
    border-color: var(--accent-cyan) !important;
}

.timeline-node .node-bubble {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-green);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.timeline-node .node-bubble.answer {
    border-color: var(--accent-green);
}

.timeline-node .node-bubble.vote {
    border-color: var(--accent-purple);
    background: rgba(187, 154, 247, 0.1);
}

.timeline-node .node-bubble.final {
    border-color: var(--accent-green);
    background: var(--accent-green);
    color: var(--bg-primary);
}

.timeline-node .node-icon {
    font-size: 1rem;
}

.timeline-node .node-label {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.8rem;
}

.timeline-node .vote-target {
    font-size: 0.7rem;
    color: var(--accent-purple);
    font-weight: 500;
}

/* Legacy horizontal graph styles (kept for backward compat) */
.coord-graph-container {
    overflow-x: auto;
    padding: 1rem 0;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.coord-graph {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: max-content;
    padding: 1rem 1.5rem;
}

.coord-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.coord-row-label {
    min-width: 70px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coord-nodes {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.coord-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.coord-node:hover {
    transform: translateY(-2px);
}

.node-bubble {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-green);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.answer-node .node-bubble {
    border-color: var(--accent-green);
}

.vote-node .node-bubble {
    border-color: var(--accent-purple);
    background: rgba(187, 154, 247, 0.1);
}

.final-node .node-bubble {
    border-color: var(--accent-green);
    background: var(--accent-green);
    color: var(--bg-primary);
}

.final-node .node-bubble.final {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.node-icon {
    font-size: 1rem;
}

.node-label {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.8rem;
}

.node-agent {
    font-size: 0.7rem;
    color: var(--accent-cyan);
    font-weight: 500;
}

.node-time {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.node-vote-target {
    font-size: 0.75rem;
    color: var(--accent-purple);
    font-weight: 500;
}

.node-detail {
    max-width: 200px;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    word-wrap: break-word;
}

/* Legend */
.coord-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    padding: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid;
}

.legend-dot.answer {
    border-color: var(--accent-green);
    background: transparent;
}

.legend-dot.vote {
    border-color: var(--accent-purple);
    background: rgba(187, 154, 247, 0.2);
}

.legend-dot.final {
    border-color: var(--accent-green);
    background: var(--accent-green);
}

.legend-line {
    width: 24px;
    height: 3px;
    border-radius: 2px;
}

.legend-line.context {
    background: rgba(125, 207, 255, 0.5);
}

.legend-line.voted {
    background: var(--accent-green);
}

/* Legacy timeline classes for backward compatibility */
.event-agent { color: var(--accent-cyan); }

/* Answers - Collapsible Style */
.answer-collapsible {
    margin-bottom: 0.5rem;
}

.answer-collapsible .collapsible-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.answer-label {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 500;
}

.answer-agent-badge {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Agent Tabs Layout */
.agent-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}

.agent-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.agent-tab:hover {
    background: var(--bg-tertiary);
}

.agent-tab.active {
    background: var(--bg-tertiary);
    color: var(--accent-cyan);
    border-color: var(--border-color);
    border-bottom: 1px solid var(--bg-tertiary);
}

.agent-tab.winner-tab {
    border-color: var(--accent-green);
}

.agent-tab.winner-tab.active {
    color: var(--accent-green);
}

.winner-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
}

.tab-count {
    background: var(--bg-primary);
    color: var(--text-muted);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

.agent-tab.active .tab-count {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.agent-tab.winner-tab.active .tab-count {
    background: var(--accent-green);
}

/* Error state for agent tabs */
.agent-tab.error-tab {
    border-color: var(--accent-red);
}

.agent-tab.error-tab.active {
    color: var(--accent-red);
}

.error-dot {
    width: 16px;
    height: 16px;
    background: var(--accent-red);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(247, 118, 142, 0.1);
    border: 1px solid var(--accent-red);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.agent-error-banner .error-icon {
    font-size: 1.5rem;
}

.agent-error-banner .error-details {
    flex: 1;
}

.agent-error-banner .error-type {
    font-weight: 600;
    color: var(--accent-red);
    text-transform: capitalize;
    margin-bottom: 0.25rem;
}

.agent-error-banner .error-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Agent Panels */
.agent-panels {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    min-height: 200px;
}

.agent-panel {
    display: none;
    padding: 1rem;
}

.agent-panel.active {
    display: block;
}

/* Sub-tabs */
.sub-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: 6px;
    width: fit-content;
}

.sub-tab {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.sub-tab:hover {
    color: var(--text-primary);
}

.sub-tab.active {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.sub-tab-count {
    background: rgba(255,255,255,0.2);
    padding: 0.1rem 0.35rem;
    border-radius: 8px;
    font-size: 0.7rem;
}

.sub-tab-check {
    color: var(--accent-green);
}

.sub-tab.active .sub-tab-check {
    color: var(--bg-primary);
}

/* Sub-panels */
.sub-panel {
    display: none;
}

.sub-panel.active {
    display: block;
}

/* Answer items in panel */
.agent-panel .answer-collapsible {
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
}

.agent-panel .answer-collapsible:last-child {
    margin-bottom: 0;
}

.answer-num {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.answer-label-small {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: auto;
    margin-right: 0.5rem;
}

/* Vote options */
.vote-options-section {
    margin-bottom: 1rem;
}

.vote-options-header {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vote-options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vote-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
}

.vote-option.voted-for {
    border-color: var(--accent-green);
    background: rgba(158, 206, 106, 0.1);
}

.vote-option-label {
    font-weight: 600;
    color: var(--text-primary);
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

.vote-option-agent {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.vote-option-check {
    color: var(--accent-green);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Vote detail */
.vote-detail {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
}

.vote-detail-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.vote-detail-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.vote-detail-value {
    color: var(--accent-purple);
    font-weight: 600;
    font-size: 0.95rem;
}

.vote-detail-reason {
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.vote-reason-text {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Vote collapsibles */
.vote-collapsible {
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
}

.vote-collapsible.latest-vote {
    border-color: var(--accent-green);
}

.vote-round {
    font-weight: 600;
    color: var(--accent-purple);
    font-size: 0.85rem;
}

.vote-choice {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.latest-badge {
    background: var(--accent-green);
    color: var(--bg-primary);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: auto;
    margin-right: 0.5rem;
}

/* Workspace in sub-panel */
.workspace-actions {
    margin-bottom: 1rem;
}

.sub-panel .workspace-file-list {
    max-height: 400px;
    overflow-y: auto;
}

.answer-content {
    display: none;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.answer-content.active {
    display: block;
}

.answer-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.answer-meta-item {
    color: var(--text-muted);
}

.answer-meta-item span {
    color: var(--text-secondary);
}

.answer-text {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1.25rem;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85rem;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.vote-info {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    border-left: 3px solid var(--accent-purple);
}

.vote-info-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent-purple);
}

.vote-reason {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

/* Final Answer */
.final-answer-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid var(--accent-green);
}

.final-answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.final-answer-content {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1.25rem;
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85rem;
    max-height: none;
    overflow-y: visible;
}

.final-answer-text {
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.final-answer-content .inline-workspace {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* Collapsible */
.collapsible {
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.collapsible-header {
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.collapsible-header:hover { background: var(--bg-tertiary); }

.collapsible-content {
    display: none;
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.collapsible.open .collapsible-content { display: block; }

.collapsible-icon {
    transition: transform 0.2s;
    color: var(--text-muted);
}

.collapsible.open .collapsible-icon { transform: rotate(180deg); }

.agent-log {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.75rem;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    word-break: break-word;
}

.config-block {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    margin: 0;
}

/* Config Summary */
.config-summary {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.config-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.35rem 0;
    font-size: 0.9rem;
}

.config-label {
    color: var(--text-muted);
    min-width: 80px;
    font-weight: 500;
}

.config-item {
    color: var(--text-secondary);
}

/* Config Actions */
.config-actions {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
    background: var(--border-color);
}

.action-btn.copied {
    background: var(--accent-green);
}

.config-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0.5rem 0 1rem 0;
    font-style: italic;
}

.config-section-top {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--accent-cyan);
    margin-bottom: 1.5rem;
}

.config-section-top .section-title {
    margin-bottom: 0.75rem;
}

/* Workspace Browser */
.workspace-browser {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.workspace-agent {
    border-bottom: 1px solid var(--border-color);
}

.workspace-agent:last-child {
    border-bottom: none;
}

.workspace-agent-name {
    font-weight: 600;
    color: var(--accent-cyan);
}

.workspace-file-count {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: auto;
    margin-right: 0.5rem;
}

.ws-download-all-btn {
    padding: 0.3rem 0.6rem;
    background: var(--accent-purple);
    color: var(--bg-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-right: 0.5rem;
}

.ws-download-all-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* Inline workspace within answers */
.inline-workspace {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.inline-workspace-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.inline-ws-icon {
    font-size: 1rem;
}

.inline-ws-title {
    font-weight: 600;
}

.inline-workspace-files {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

/* Workspace badge on answer header */
.ws-badge {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
    margin-right: 0.5rem;
}

.workspace-file-list {
    display: flex;
    flex-direction: column;
    max-height: 400px;
    overflow-y: auto;
}

.workspace-file {
    border-bottom: 1px solid var(--border-color);
}

.workspace-file:last-child {
    border-bottom: none;
}

.workspace-file-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    background: var(--bg-tertiary);
}

.workspace-file-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.workspace-file-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.workspace-file-path {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-file-size {
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.workspace-file-toggle {
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.workspace-file.expanded .workspace-file-toggle {
    transform: rotate(90deg);
}

.workspace-file-content {
    display: none;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.workspace-file.expanded .workspace-file-content {
    display: block;
}

.workspace-file-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.ws-action-btn {
    padding: 0.35rem 0.6rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.ws-action-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
}

.workspace-file-code {
    max-height: 300px;
    overflow: auto;
}

.workspace-file-code pre {
    margin: 0;
    padding: 0.75rem;
    font-size: 0.8rem;
    background: transparent;
    white-space: pre-wrap;
    word-break: break-word;
}

.workspace-file-preview {
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.workspace-file-binary-notice {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.workspace-file-binary-notice p {
    margin: 0;
}

/* Split-pane workspace layout */
.inline-workspace.split-pane {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.ws-split-container {
    display: flex;
    height: 350px;
    background: var(--bg-secondary);
}

.ws-file-tree {
    width: 240px;
    min-width: 200px;
    max-width: 320px;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.ws-tree-file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}

.ws-tree-file:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ws-tree-file.selected {
    background: var(--accent-primary);
    color: white;
}

.ws-tree-file.selected .ws-tree-size {
    color: rgba(255, 255, 255, 0.7);
}

.ws-tree-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ws-tree-name {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.8rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-tree-size {
    font-size: 0.65rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 0.25rem;
    opacity: 0.8;
}

.ws-preview-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-secondary);
}

.ws-preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ws-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    gap: 0.5rem;
}

.ws-preview-filename {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-preview-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ws-preview-content {
    flex: 1;
    overflow: auto;
}

.ws-preview-content.pdf iframe,
.ws-preview-content.image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.ws-preview-content.image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ws-preview-content.code {
    padding: 0;
}

.ws-preview-content.code pre {
    margin: 0;
    padding: 0.75rem;
    font-size: 0.8rem;
    background: transparent;
    white-space: pre-wrap;
    word-break: break-word;
    height: 100%;
    overflow: auto;
}

.ws-preview-content.binary {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.ws-binary-notice {
    text-align: center;
    color: var(--text-muted);
}

.ws-binary-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.ws-binary-notice p {
    margin: 0.25rem 0;
}

.ws-binary-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Workspace Tree Structure */
.workspace-tree {
    max-height: 500px;
    overflow-y: auto;
}

.tree-folder {
    border-bottom: 1px solid var(--border-color);
}

.tree-folder:last-child {
    border-bottom: none;
}

.tree-folder-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    background: var(--bg-tertiary);
    transition: background 0.15s;
}

.tree-folder-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tree-folder-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.tree-folder-name {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    flex-grow: 1;
}

.tree-folder-count {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.tree-folder-toggle {
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.tree-folder.expanded .tree-folder-toggle {
    transform: rotate(90deg);
}

.tree-folder-content {
    display: none;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.tree-folder.expanded .tree-folder-content {
    display: block;
}

/* Tree Files */
.tree-file {
    border-bottom: 1px solid var(--border-color);
}

.tree-file:last-child {
    border-bottom: none;
}

.tree-file-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: background 0.15s;
}

.tree-file-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.tree-file-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.tree-file-name {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.8rem;
    color: var(--text-primary);
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-file-size {
    color: var(--text-muted);
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.tree-file-toggle {
    color: var(--text-muted);
    font-size: 0.65rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.tree-file.expanded .tree-file-toggle {
    transform: rotate(90deg);
}

.tree-file-content {
    display: none;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.tree-file.expanded .tree-file-content {
    display: block;
}

/* Footer */
.export-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.export-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.export-footer a:hover {
    text-decoration: underline;
}

/* Buttons */
.copy-btn {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
}

.copy-btn:hover { opacity: 0.9; }
.copy-btn.copied { background: var(--accent-green); }

.no-data {
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
    text-align: center;
}

/* Session Status Banner */
.status-banner {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-banner.status-error {
    background: rgba(247, 118, 142, 0.15);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
}

.status-banner.status-interrupted {
    background: rgba(224, 175, 104, 0.15);
    border: 1px solid var(--accent-yellow);
    color: var(--accent-yellow);
}

.status-banner.status-timeout {
    background: rgba(224, 175, 104, 0.15);
    border: 1px solid var(--accent-yellow);
    color: var(--accent-yellow);
}

.status-icon {
    font-size: 1.2rem;
}

.status-message {
    flex: 1;
}

/* Turn Navigation */
.turn-navigation {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

.turn-nav-header {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.turn-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.turn-question {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-left: 3px solid var(--accent-cyan);
}

.turn-tab {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.turn-tab:hover {
    background: var(--border-color);
}

.turn-tab.active {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
}

.turn-tab.complete .turn-status-icon {
    color: var(--accent-green);
}

.turn-tab.error .turn-status-icon {
    color: var(--accent-red);
}

.turn-tab.pending .turn-status-icon {
    color: var(--accent-yellow);
}

.turn-tab.active .turn-status-icon {
    color: inherit;
}

.turn-status-icon {
    margin-right: 0.25rem;
}

/* Attempt badge for multiple attempts */
.attempt-badge {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 0.25rem;
    font-weight: normal;
}

.turn-tab.active .attempt-badge {
    opacity: 1;
}

/* Conversation History Button */
.conversation-history-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}

.conversation-history-btn:hover {
    background: #5fb8e0;
    transform: scale(1.02);
}

.history-icon {
    font-size: 0.9rem;
}

/* Conversation History Panel */
.conversation-history-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 500px;
    max-width: 90vw;
    max-height: 70vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.conversation-history-panel.hidden {
    display: none;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.history-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.history-close-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.history-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    max-width: 95%;
}

.user-message {
    background: rgba(125, 207, 255, 0.15);
    border-left: 3px solid var(--accent-cyan);
    align-self: flex-start;
}

.assistant-message {
    background: rgba(158, 206, 106, 0.15);
    border-right: 3px solid var(--accent-green);
    align-self: flex-end;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.message-role {
    font-weight: 600;
}

.user-role {
    color: var(--accent-cyan);
}

.assistant-role {
    color: var(--accent-green);
}

.message-turn {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.message-winner {
    color: var(--accent-yellow);
    font-size: 0.75rem;
    margin-left: auto;
}

.message-content {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.show-more-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-top: 0.5rem;
    transition: color 0.2s;
}

.show-more-btn:hover {
    color: var(--accent-cyan);
}

.message-full {
    margin-top: 0.5rem;
}

/* =============================================================================
   Artifact Preview Modal (using React bundle)
   ============================================================================= */

.artifact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    flex-direction: column;
}

.artifact-modal.active {
    display: flex;
}

.artifact-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.artifact-modal-header span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: ui-monospace, 'SF Mono', 'Monaco', monospace;
}

.artifact-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.artifact-modal-close:hover {
    color: var(--accent-red);
    transform: scale(1.1);
}

.artifact-modal-content {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

/* Make the React renderer container fill the space */
.artifact-modal-content > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Make iframes inside the preview fill available space */
.artifact-modal-content iframe {
    flex: 1;
    width: 100% !important;
    height: 100% !important;
    min-height: 70vh;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
}

/* Raw content fallback for unsupported types */
.artifact-modal-content .raw-content {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-family: ui-monospace, 'SF Mono', 'Monaco', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 100%;
    overflow: auto;
}

/* Error message styling */
.artifact-modal-content .error {
    color: var(--accent-red);
    padding: 2rem;
    text-align: center;
    font-size: 1rem;
}

/* Preview button in workspace tree */
.tree-file-preview {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-left: 0.5rem;
}

.tree-file-preview:hover {
    opacity: 0.8;
}

/* Preview badge for previewable files */
.preview-badge {
    background: var(--accent-purple);
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
    body { padding: 1rem; }
    .meta-row { flex-direction: column; gap: 0.5rem; }
    .tool-name { min-width: 120px; max-width: 200px; }
    .tool-stats { min-width: 80px; }
    .agent-stats { grid-template-columns: 1fr; }
    .turn-tabs { flex-direction: column; }
    .conversation-history-panel {
        width: 95vw;
        right: 2.5vw;
        top: 60px;
    }

    /* Artifact modal responsive */
    .artifact-modal-content {
        padding: 1rem;
    }
}
