/* ── Reset & Variables (matches main app's style.css) ─ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Palette: warm cream surfaces, earned color */
    --bg:             #f8f6f1;
    --bg-surface:     #fbfaf6;
    --bg-card:        #f0ece4;
    --bg-hover:       #e8e2d8;
    --border:         #d8d0c4;
    --border-subtle:  #e8e2d8;
    --text:           #1a1714;
    --text-secondary: #6a6050;
    --text-muted:     #a09888;
    --text-faint:     #c8c0b4;

    /* State colors (earned, sparingly applied) */
    --green:     #2d8a4e;
    --green-dim: rgba(45, 138, 78, 0.12);
    --amber:     #c89563;
    --amber-dim: rgba(200, 149, 99, 0.14);
    --red:       #b2493e;
    --red-dim:   rgba(178, 73, 62, 0.12);
    --violet:    #7c6b99;
    --violet-dim: rgba(124, 107, 153, 0.14);
    --purple:    #7c6b99;
    --purple-dim: rgba(124, 107, 153, 0.12);

    /* Accent moves with text — no decorative blue */
    --accent:        #1a1714;
    --accent-dim:    rgba(26, 23, 20, 0.06);

    /* Fonts: same family as main app */
    --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:   'Space Mono', 'Fira Code', monospace;

    --radius:    8px;
    --radius-lg: 12px;
    --sidebar-w: 240px;
    --topbar-h:  48px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    height: 100vh;
    overflow: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-weight: 300;
}

/* ── Layout ──────────────────────────────────────── */
.app {
    display: flex;
    height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--text);
    color: var(--bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.5px;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    letter-spacing: -0.3px;
}

.brand-sub {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-muted);
    margin-top: 1px;
}

.sidebar-nav {
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text);
}

.nav-item.active {
    background: var(--text);
    color: var(--bg);
}

.nav-item.active:hover {
    background: #2a2720;
}

.nav-item.has-data::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    margin-left: auto;
}

.nav-item.active.has-data::after {
    background: var(--bg);
}

/* ── History sidebar ─────────────────────────────── */
.history-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-top: 1px solid var(--border-subtle);
    padding-top: 8px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 16px 8px;
}

.history-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.new-run-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 3px 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.15s;
}

.new-run-btn:hover {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--text-muted);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px;
}

.history-item {
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding: 8px;
    margin-bottom: 1px;
    border: none;
    border-radius: 6px;
    background: none;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 12px;
    text-align: left;
    line-height: 1.4;
    transition: background 0.1s;
}

.history-item:hover {
    background: var(--bg-card);
}

.history-item.active {
    background: var(--bg-card);
    color: var(--text);
}

.history-item-row {
    flex: 1;
    cursor: pointer;
    min-width: 0;
}

.history-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.1s;
    flex-shrink: 0;
    margin-top: 2px;
}

.history-item:hover .history-delete-btn { opacity: 1; }

.history-delete-btn:hover {
    color: var(--red);
    background: var(--red-dim);
}

.history-item-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    font-weight: 400;
}

.history-item-meta {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-item-status {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
}

.history-item-status.completed { background: var(--green); }
.history-item-status.running   { background: var(--amber); }

/* ── Dialog ──────────────────────────────────────── */
.dialog-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 23, 20, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.dialog-overlay.open { display: flex; }

.dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 360px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(26, 23, 20, 0.18);
}

.dialog-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.dialog-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 20px;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.dialog-btn {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 400;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.dialog-btn-cancel {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.dialog-btn-cancel:hover { background: var(--bg-hover); }

.dialog-btn-delete {
    background: var(--red);
    color: var(--bg);
}

.dialog-btn-delete:hover { background: #963d33; }

.sidebar-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border-subtle);
}

.theme-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 9px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    transition: all 0.15s;
}

.theme-btn:hover {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--text-muted);
}

/* ── Main ────────────────────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    height: var(--topbar-h);
    padding: 0 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.status-badge {
    font-size: 11px;
    font-weight: 400;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 400;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.export-btn:hover {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--text-muted);
}

.export-btn.hidden { display: none; }

.status-badge.running {
    background: var(--amber-dim);
    border-color: var(--amber);
    color: var(--amber);
    animation: pulse-badge 2s ease-in-out infinite;
}

.status-badge.completed {
    background: var(--green-dim);
    border-color: var(--green);
    color: var(--green);
}

.status-badge.error {
    background: var(--red-dim);
    border-color: var(--red);
    color: var(--red);
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

/* ── Content ─────────────────────────────────────── */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ── Hero / Input ────────────────────────────────── */
.hero {
    display: flex;
    justify-content: center;
    padding: 60px 0 40px;
}

.hero-inner {
    max-width: 640px;
    width: 100%;
    text-align: center;
}

.hero-heading {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.6px;
    margin-bottom: 10px;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 300;
    margin-bottom: 24px;
    line-height: 1.7;
}

.input-group textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}

.input-group textarea:focus { border-color: var(--text-muted); }

.input-group textarea::placeholder { color: var(--text-faint); }

.run-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 28px;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s;
}

.run-btn:hover { background: #2a2720; }
.run-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* File-attach row beneath the textarea */
.file-attach-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.file-attach-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.file-attach-label:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.file-attach-label.has-file {
    color: var(--text);
    border-style: solid;
    background: var(--bg-card);
}

.file-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.file-clear-btn:hover {
    color: var(--red);
}

/* Inline toggle near the textarea (mirrors landing-toggle in main app) */
.input-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.input-toggle input[type="checkbox"] {
    accent-color: var(--text);
    cursor: pointer;
}

/* ── Pipeline Progress ───────────────────────────── */
.pipeline-progress {
    margin-bottom: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 14px 22px;
}

.pipeline-steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.pipe-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    white-space: nowrap;
}

.pipe-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--border);
    flex-shrink: 0;
    transition: all 0.3s;
}

.pipe-step.active .pipe-dot {
    background: var(--text);
    border-color: var(--text);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.pipe-step.done .pipe-dot {
    background: var(--green);
    border-color: var(--green);
}

.pipe-step.active,
.pipe-step.done {
    color: var(--text);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.pipe-connector {
    flex: 1;
    height: 1px;
    background: var(--border);
    margin: 0 10px;
    min-width: 20px;
    transition: background 0.3s;
}

.pipe-connector.done { background: var(--green); }

/* ── Tabs ────────────────────────────────────────── */
.tab-panels { flex: 1; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-body {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    min-height: 300px;
}

.empty-state {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 300;
    text-align: center;
    padding: 60px 20px;
}

/* ── Markdown Body ───────────────────────────────── */
.markdown-body h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: -0.4px;
}
.markdown-body h2 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    margin: 26px 0 10px;
    color: var(--text);
    letter-spacing: -0.2px;
}
.markdown-body h3 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    margin: 18px 0 8px;
}
.markdown-body p {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
}
.markdown-body ul, .markdown-body ol {
    margin: 8px 0 16px 20px;
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
}
.markdown-body li { margin-bottom: 4px; }
.markdown-body strong { color: var(--text); font-weight: 600; }
.markdown-body a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.15s;
}
.markdown-body a:hover { border-color: var(--text); }
.markdown-body blockquote {
    border-left: 2px solid var(--border);
    padding-left: 16px;
    margin: 12px 0;
    color: var(--text-muted);
    font-style: italic;
}
.markdown-body code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text);
}
.markdown-body pre {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 14px;
    overflow-x: auto;
    margin: 12px 0;
}
.markdown-body pre code { background: none; padding: 0; font-size: 12px; }

/* ── Tables ──────────────────────────────────────── */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
}

.markdown-body th {
    text-align: left;
    padding: 9px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-weight: 600;
    color: var(--text);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.markdown-body td {
    padding: 9px 12px;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-weight: 300;
}

.markdown-body tr:hover td { background: var(--bg-card); }

/* ── Data Cards ──────────────────────────────────── */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.data-card {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 16px;
    transition: border-color 0.2s;
}

.data-card:hover { border-color: var(--border); }

.data-card-muted {
    background: var(--bg-card);
    opacity: 0.85;
    border-style: dashed;
}
.data-card-muted .data-card-title { font-weight: 500; }

/* Expandable cards */
.data-card.expandable { cursor: pointer; }
.data-card.expandable:hover { border-color: var(--text-muted); }

.card-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}
.data-card.expanded .card-snippet {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.data-card-expand {
    display: none;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-subtle);
}
.data-card.expanded .data-card-expand { display: block; }

.card-chevron {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s;
    user-select: none;
}
.data-card.expanded .card-chevron,
.theme-item.expanded .card-chevron { transform: rotate(180deg); }

.tag-dropped {
    background: var(--amber-dim) !important;
    color: var(--amber) !important;
}
.tag-assignee {
    background: var(--purple-dim);
    color: var(--purple);
}

/* Patent list rows (used inside expanded assignee + cluster cards) */
.patent-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}
.patent-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 4px;
    background: var(--bg-card);
    font-size: 12px;
}
.patent-row:hover { background: var(--bg-hover); }
.patent-row-title {
    flex: 1;
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.patent-row-title:hover { text-decoration: underline; }
.patent-row-pub {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.patent-row-score {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Expandable cluster (theme-item) */
.theme-item.expandable { cursor: pointer; }
.theme-item.expandable:hover { border-color: var(--text-muted); }
.theme-expand {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-subtle);
}
.theme-item.expanded .theme-expand { display: block; }

.data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.data-card-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
    line-height: 1.35;
}

.data-card-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    flex-shrink: 0;
}

.badge-high   { background: var(--green-dim);  color: var(--green); }
.badge-medium { background: var(--amber-dim);  color: var(--amber); }
.badge-low    { background: var(--violet-dim); color: var(--violet); }

.data-card-body {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
}

.data-card-body p { margin-bottom: 6px; }

.data-card-meta {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.meta-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
}

a.meta-tag:hover {
    color: var(--text);
    border-color: var(--border);
}

/* ── Stat cards row ──────────────────────────────── */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-align: center;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.02em;
}

/* ── Sentiment ───────────────────────────────────── */
.sentiment-positive { color: var(--green); }
.sentiment-negative { color: var(--red); }
.sentiment-mixed    { color: var(--amber); }

/* ── Logs ────────────────────────────────────────── */
.logs-panel {
    padding: 0 !important;
    overflow: hidden;
}

.log-output {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.7;
    color: var(--text-secondary);
    padding: 16px;
    height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    background: var(--bg);
}

/* ── Section title inside panels ─────────────────── */
.section-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.section-subtitle {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.65;
}

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

.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

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

/* ── Quote cards ─────────────────────────────────── */
.quote-card {
    background: var(--bg);
    border-left: 2px solid var(--violet);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 12px 16px;
    margin-bottom: 10px;
}

.quote-text {
    font-size: 13px;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.6;
}

.quote-source {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Theme list items ────────────────────────────── */
.theme-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.theme-freq {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.freq-high   { background: var(--green-dim);  color: var(--green); }
.freq-medium { background: var(--amber-dim);  color: var(--amber); }
.freq-low    { background: var(--violet-dim); color: var(--violet); }

.theme-body { flex: 1; }

.theme-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text);
}

.theme-desc {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-muted);
}

/* ── Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
