.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-top-color: #111827;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

/* Sidebar nav link states */
.nav-link {
    color: #6b7280;
}
.nav-link:hover {
    background-color: #f3f4f6;
    color: #111827;
}
.nav-link.active {
    background-color: #f3f4f6;
    color: #111827;
}

/* Report section TOC highlight on scroll */
.toc-link.active {
    color: #111827;
    background-color: #f3f4f6;
    font-weight: 600;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Prose improvements for report content */
/* Status thread – distinct log entries */
.status-thread {
    max-height: 420px;
    overflow-y: auto;
    border-left: 3px solid #e5e7eb;
    padding-left: 12px;
    margin-top: 8px;
}

.status-entry {
    padding: 6px 10px;
    margin-bottom: 4px;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    word-break: break-word;
}

.status-thinking {
    background-color: #fef9c3;
    color: #854d0e;
}

.status-decision {
    background-color: #fce7f3;
    color: #9d174d;
}

.status-search {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-fetch {
    background-color: #e0e7ff;
    color: #3730a3;
}

.status-result {
    background-color: #f0fdf4;
    color: #166534;
}

.status-response {
    background-color: #f5f3ff;
    color: #5b21b6;
}

.status-tool {
    background-color: #fef3c7;
    color: #92400e;
}

.status-info {
    background-color: #f9fafb;
    color: #374151;
}

/* Per-agent progress cards */
.agent-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
}

.agent-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

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

.agent-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    min-width: 0;
}

.agent-status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.agent-status .spinner {
    width: 12px;
    height: 12px;
    border-width: 1.5px;
}

.agent-log {
    max-height: 180px;
    overflow-y: auto;
    flex: 1;
}

.agent-log .status-entry {
    font-size: 0.72rem;
    padding: 3px 6px;
    margin-bottom: 2px;
}

.report-prose p {
    margin-bottom: 0.75em;
    line-height: 1.7;
}

.report-prose strong {
    color: #1f2937;
}

.report-prose ul, .report-prose ol {
    margin-top: 0.5em;
    margin-bottom: 0.75em;
    padding-left: 1.5em;
}

.report-prose li {
    margin-bottom: 0.25em;
}
