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

:root {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --border: #334155;
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --cyan: #06b6d4;
    --purple: #a855f7;
    --radius: 8px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout ─── */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand-icon { display: inline-flex; align-items: center; }
.navbar-brand-icon .navbar-brand-logo { width: 30px; height: 30px; display: block; object-fit: contain; flex-shrink: 0; }
.navbar-brand-text {
    font-weight: 700;
    font-size: 1.485rem;
    color: var(--accent-hover);
    transition: color 0.15s;
}
.navbar-brand-text:hover { color: var(--text); text-decoration: none; }
.brand-short { display: none; }
.navbar-links { display: flex; gap: 1.5rem; flex: 1; }
.navbar-links a { color: var(--text-dim); font-size: 0.9rem; }
.navbar-links a:hover, .navbar-links a.active { color: var(--text); text-decoration: none; }
/* Home page has only User Guide in the navbar — push it to the right on desktop. */
.navbar-links a:only-child { margin-left: auto; }
.navbar-user { color: var(--text-dim); font-size: 0.85rem; display: flex; align-items: center; gap: 1rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ─── Flash Messages ─── */
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.9rem; }
.flash-success { background: rgba(34,197,94,0.15); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.flash-error { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.flash-info { background: rgba(99,102,241,0.15); color: var(--accent-hover); border: 1px solid rgba(99,102,241,0.3); }

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

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

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    display: block;
}
.action-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    text-decoration: none;
    transform: translateY(-2px);
}
.action-card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.action-card h2 { font-size: 1.2rem; color: var(--text); margin-bottom: 0.5rem; }
.action-card p { color: var(--text-dim); font-size: 0.9rem; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-analyze { background: #f59e0b; color: white; }
.btn-analyze:hover { background: #d97706; text-decoration: none; }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { opacity: 0.9; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); text-decoration: none; }
.btn-microsoft {
    background: #2f2f2f;
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: 1px solid #666;
}
.btn-microsoft:hover { background: #444; text-decoration: none; }
.btn-microsoft svg { width: 20px; height: 20px; }

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.reports-table-card {
    width: 120%;
    margin-left: -10%;
}
.solutions-table-card {
    width: 120%;
    margin-left: -10%;
}
thead th { text-align: left; padding: 0.75rem 1rem; border-bottom: 2px solid var(--border); color: var(--text-dim); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
tbody td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
tbody tr:hover { background: rgba(99,102,241,0.05); }

/* ─── Badges ─── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-high { background: rgba(239,68,68,0.2); color: var(--red); }
.badge-medium { background: rgba(234,179,8,0.2); color: var(--yellow); }
.badge-low { background: rgba(148,163,184,0.2); color: var(--text-dim); }
.badge-success { background: rgba(34,197,94,0.2); color: var(--green); }
.badge-info { background: rgba(6,182,212,0.2); color: var(--cyan); }
.badge-purple { background: rgba(168,85,247,0.2); color: var(--purple); }
.badge-pending { background: rgba(234,179,8,0.2); color: var(--yellow); }
.badge-running { background: rgba(99,102,241,0.2); color: var(--accent-hover); }
.badge-completed { background: rgba(34,197,94,0.2); color: var(--green); }
.badge-failed { background: rgba(239,68,68,0.2); color: var(--red); }

/* ─── Stats Row ─── */
.stats-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    flex: 1;
    min-width: 140px;
    text-align: center;
}
.stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-label { color: var(--text-dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ─── Page Headers ─── */
.page-header { margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.page-header h1 { font-size: 1.5rem; }
.home-landing { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 60px - 4rem); }
.page-hero { display: flex; flex-direction: column; align-items: center; margin-bottom: 0.2rem; }
.page-logo { height: 200px; max-height: 80vh; width: auto; }
.page-hero-description { max-width: 720px; text-align: center; color: var(--text-muted, #6b7280); font-size: 1.05rem; line-height: 1.6; margin: 1.25rem auto 0; }
.page-hero hr { width: 75%; border: none; border-top: 1px solid var(--border); margin: 1rem 0 3rem; }

/* ─── Environment/Solution List ─── */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: rgba(99,102,241,0.05); }
.list-item-info h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.list-item-info p { color: var(--text-dim); font-size: 0.85rem; }

/* ─── Login Page ─── */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
}
.login-card h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.login-card p { color: var(--text-dim); margin-bottom: 2rem; }
.login-logo { margin-bottom: 1.5rem; }
.login-logo svg,
.login-logo img { width: 72px; height: 72px; display: block; margin: 0 auto; }

/* ─── Spinner ─── */
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Section Headers ─── */
.section-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.section-count {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 400;
}

/* ─── Upload ─── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}
.upload-zone:hover { border-color: var(--accent); }
.upload-zone.dragover { border-color: var(--accent); background: rgba(99,102,241,0.05); }
.upload-zone p { color: var(--text-dim); margin-top: 0.5rem; }
.upload-zone input[type="file"] { display: none; }

/* ─── Breadcrumb ─── */
.breadcrumb { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1rem; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { margin: 0 0.5rem; }

/* ─── Code snippets ─── */
.code-snippet {
    background: rgba(0,0,0,0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-dim);
    word-break: break-all;
}

/* ─── Toggle Switch ─── */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 22px;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); background: white; }

.api-key-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-eye {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
}
.btn-eye:hover {
    color: var(--text);
}

/* ─── Settings tabs ─── */
.settings-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.settings-tab {
    background: transparent;
    border: 0;
    padding: 0.6rem 1rem;
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.settings-tab:hover { color: var(--text); }
.settings-tab.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}
.settings-tab-panel[hidden] { display: none; }

/* ─── Analyzer Grid ─── */
.analyzer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}
.analyzer-card { padding: 1.2rem; cursor: grab; transition: opacity 0.1s, transform 0.1s; }
.analyzer-card:active { cursor: grabbing; }
.analyzer-card.dragging { opacity: 0.45; transform: scale(0.98); }
.analyzer-card input, .analyzer-card select, .analyzer-card button, .analyzer-card a { cursor: auto; }
.analyzer-grid.drag-over {
    outline: 2px dashed var(--accent);
    outline-offset: 4px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: var(--radius);
}
.category-empty {
    grid-column: 1 / -1;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-style: italic;
    margin: 0;
    padding: 0.6rem 0.25rem;
}
.analyzer-grid:has(.analyzer-card) .category-empty { display: none; }

/* ─── Category box (groups analyzers under a category) ─── */
.category-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
}
.category-box > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.15rem 0;
    margin-bottom: 0.75rem;
}
.category-box > summary::-webkit-details-marker { display: none; }
.category-box[open] > summary { margin-bottom: 1rem; }
.category-box:not([open]) > summary { margin-bottom: 0; }
.category-caret {
    flex: 0 0 auto;
    color: var(--text-dim);
    transition: transform 0.15s ease;
}
.category-box[open] > summary .category-caret { transform: rotate(90deg); }
.category-box > summary:hover .category-caret { color: var(--text); }

/* ─── Code Viewer Modal ─── */
.code-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: stretch;
    justify-content: center;
    z-index: 10000;
    padding: 5vh 2rem;
}
.code-modal-backdrop[hidden] {
    display: none;
}
.code-modal {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
/* Shrink-wrap variant: modal hugs its content height, with cap */
.code-modal.code-modal-auto {
    align-self: center;
    height: auto;
    max-height: 90vh;
    overflow: auto;
}
/* Test-analyzer modal: block input while the test is running so the user
   can't change the solution picker, fire a second run, or tab around to
   a different radio mid-request. */
.code-modal.is-busy input,
.code-modal.is-busy select,
.code-modal.is-busy button {
    pointer-events: none;
}
/* Busy overlay positioning — class-based so the `hidden` attribute reliably
   hides it. Inline `display:flex` on an element with `hidden` is a trap:
   the inline rule wins over the UA stylesheet's `display:none`. */
.test-modal-busy {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    border-radius: var(--radius);
    z-index: 2;
}
.test-modal-busy[hidden] { display: none; }
.code-viewer {
    overflow: auto;
    flex: 1;
    min-height: 0;
}
.code-block {
    background: #1e1e2e;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 0;
    font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    color: #d4d4d4;
}
.code-line { display: block; }
.line-num { color: #555; user-select: none; }

/* ─── Syntax Highlighting ─── */
.hl-keyword { color: #c586c0; }
.hl-string { color: #ce9178; }
.hl-comment { color: #6a9955; font-style: italic; }
.hl-number { color: #b5cea8; }
.hl-boolean { color: #569cd6; }
.hl-function { color: #dcdcaa; }
.hl-variable { color: #9cdcfe; }
.hl-operator { color: #d4d4d4; }
.hl-punctuation { color: #d4d4d4; }

/* ─── Analyzer config icon & page ─── */
.btn-config {
    color: var(--yellow);
    opacity: 0.7;
    border: 1px solid var(--border);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease, background 0.15s ease;
}
.btn-config:hover,
.btn-config:focus {
    opacity: 1;
    background: rgba(234, 179, 8, 0.08);
}

.analyzer-config-page .meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem 1.5rem;
    font-size: 0.9rem;
}
.analyzer-config-page .meta-grid .meta-label {
    color: var(--text-dim);
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}
.analyzer-config-page .meta-grid code {
    font-size: 0.85rem;
    background: var(--bg);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    color: var(--text);
}

.columns-editor { overflow-x: auto; }
.columns-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.35rem;
    font-size: 0.85rem;
}
.columns-table th {
    text-align: left;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0 0.4rem 0.2rem;
}
.columns-table td {
    padding: 0.25rem 0.4rem;
    vertical-align: middle;
}
.columns-table .form-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 0.5rem;
    color: var(--text);
    font-size: 0.85rem;
}
.columns-table select.form-input {
    font-family: inherit;
}
.columns-table .col-remove {
    color: var(--red);
}

/* Syntax-highlighted code editor (overlay technique) */
.code-editor-wrap {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #1e1e2e;
    overflow: hidden;
    height: 400px;
    min-height: 200px;
    max-height: 70vh;
    resize: vertical;
}
.code-editor-highlight,
.code-editor-textarea {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0.9rem;
    font-family: 'Cascadia Code','Fira Code',Consolas,monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    tab-size: 2;
    -moz-tab-size: 2;
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
    box-sizing: border-box;
    letter-spacing: 0;
}
.code-editor-highlight {
    pointer-events: none;
    color: #d4d4d4;
    overflow: hidden;
    border: 0;
}
.code-editor-highlight code {
    display: block;
    font: inherit;
    white-space: pre;
    background: transparent;
    padding: 0;
    border: 0;
    will-change: transform;
}
.code-editor-textarea {
    width: 100%;
    height: 100%;
    background: transparent;
    color: transparent;
    caret-color: #d4d4d4;
    border: 0;
    outline: none;
    resize: none;
    overflow: auto;
    display: block;
}
.code-editor-textarea::selection {
    background: rgba(100, 150, 220, 0.4);
}

/* ─── Run-configuration card (report body) ─── */
.report-run-card {
    padding: 1rem 1.2rem;
    margin-bottom: 1.25rem;
}
/* Persistent placement in the solutions viewer — presented as a toolbar-
   style strip that fills the available width, not a card. The bottom border
   visually separates it from the viewer content underneath, mirroring the
   look of .viewer-toolbar / .find-bar immediately above it. */
.run-config-strip {
    flex: 0 0 auto;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.4rem 0.9rem;
}
.run-config-strip .report-run-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
}
.run-config-strip .run-card-title { display: none; }
.run-config-strip .run-card-meta { gap: 0.4rem; }
.run-config-strip .run-analyzer-list {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top-style: solid;
    border-top-color: var(--border);
}
.run-card-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}
.run-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.run-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
}
.run-meta-chip .run-meta-kind {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.run-meta-chip .run-meta-value { color: var(--text); }
.run-meta-chip.run-meta-app { border-color: #a855f7; }
.run-meta-chip.run-meta-app .run-meta-kind { color: #a855f7; }
.run-meta-chip.run-source-test-set { border-color: var(--accent); }
.run-meta-chip.run-source-test-set .run-meta-kind { color: var(--accent-hover); }
.run-meta-chip.run-source-single   { border-color: var(--yellow); }
.run-meta-chip.run-source-single   .run-meta-kind { color: var(--yellow); }
.run-meta-chip.run-source-all      { border-color: var(--green); }
.run-meta-chip.run-source-all      .run-meta-kind { color: var(--green); }
.run-analyzer-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border);
}
/* Standalone layout: heading on its own line, pills on the next. */
.run-analyzer-list-standalone { display: block; }
.run-analyzer-list-standalone .run-analyzer-heading {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}
.run-analyzer-list-standalone .run-analyzer-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Brief highlight for an analyzer section when scrolled to via a pill click. */
.analyzer-section.flash-target {
    animation: analyzer-flash 1.4s ease-out;
}
@keyframes analyzer-flash {
    0%   { box-shadow: 0 0 0 2px var(--accent-hover), 0 0 0 4px rgba(99,102,241,0.25); }
    100% { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent; }
}
.run-analyzer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.75rem;
    background: var(--bg);
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.12s, filter 0.12s;
}
.run-analyzer-pill:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 1px;
}
.run-analyzer-pill .run-analyzer-name {
    color: var(--text);
    font-weight: 400;
}
.run-analyzer-pill .run-meta-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 1ch;
    text-align: right;
    padding: 0 0.35rem;
    border-radius: 8px;
}
/* Disabled state — user toggled the analyzer off in the filter. */
.run-analyzer-pill.filter-off {
    opacity: 0.38;
    filter: grayscale(0.4);
    text-decoration: line-through;
    text-decoration-color: rgba(255,255,255,0.45);
}
/* Severity tints — only the count badge carries the colour now that
   the analyzer name is plain white. The pill border still follows severity. */
.run-analyzer-pill.run-analyzer-clean { border-color: var(--green); }
.run-analyzer-pill.run-analyzer-clean .run-meta-value {
    background: rgba(34,197,94,0.18); color: var(--green);
}
.run-analyzer-pill.run-analyzer-minor { border-color: var(--yellow); }
.run-analyzer-pill.run-analyzer-minor .run-meta-value {
    background: rgba(234,179,8,0.20); color: var(--yellow);
}
.run-analyzer-pill.run-analyzer-major { border-color: var(--red); }
.run-analyzer-pill.run-analyzer-major .run-meta-value {
    background: rgba(239,68,68,0.20); color: var(--red);
}

/* Filter controls — tiny "All / None" buttons to the left of the pill row. */
.run-analyzer-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.35rem;
}
.run-analyzer-controls-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-right: 0.3rem;
}
.run-analyzer-toggle-all {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.run-analyzer-toggle-all:hover {
    color: var(--text);
    border-color: var(--accent-hover);
    background: rgba(99,102,241,0.08);
}

/* ─── Solution-list cards (mobile only) ─── */
.solutions-cards { display: none; }

/* Filename shown small/dim below the derived solution name (both views). */
.solution-card-filename,
.solution-row-filename {
    color: var(--text-dim);
    font-size: 0.72rem;
    word-break: break-all;
    margin-top: 0.15rem;
    font-weight: 400;
}

/* File-type icon next to the name in the desktop table row. */
.solution-row-name { display: flex; align-items: center; gap: 0.75rem; }
.solution-row-file-icon {
    width: 32px; height: 32px;
    flex-shrink: 0;
    color: var(--text-dim);
    display: flex;
}
.solution-row-file-icon svg { width: 100%; height: 100%; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .navbar { gap: 1rem; padding: 0 1rem; }
}

@media (max-width: 640px) {
    .brand-long  { display: none; }
    .brand-short { display: inline; }
    .navbar-brand-text { font-size: 1.25rem; }

    .navbar-links {
        position: fixed;
        top: 56px; left: 0; right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
        transform: translateY(calc(-100% - 56px));
        transition: transform 0.2s ease, visibility 0s 0.2s;
        visibility: hidden;
        z-index: 99;
    }
    .navbar-links.open {
        transform: translateY(0);
        visibility: visible;
        transition: transform 0.2s ease, visibility 0s;
    }
    .navbar-links a { padding: 0.85rem 1.25rem; font-size: 1rem; }
    .navbar-links a:only-child { margin-left: 0; }
    .navbar-links a + a { border-top: 1px solid var(--border); }

    .navbar-user { font-size: 0.75rem; }
    .container { padding: 1rem; }

    /* Solutions list: swap table for cards */
    .solutions-table-card { display: none; }
    .solutions-cards     { display: grid; gap: 0.85rem; }
    .solution-card {
        background: var(--bg-card); border: 1px solid var(--border);
        border-radius: var(--radius); padding: 1rem;
    }
    .solution-card-title { font-size: 1rem; word-break: break-word; margin-bottom: 0; }
    .solution-card-meta  { color: var(--text-dim); font-size: 0.8rem; display: flex; gap: 1rem; margin-bottom: 0.85rem; }
    .solution-card-actions { display: flex; gap: 0.5rem; align-items: center; }
    .solution-card-actions .solution-card-file-icon {
        width: 53px; height: 53px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: auto;
        color: var(--text-dim);
    }
    .solution-card-actions .solution-card-file-icon svg { width: 28px; height: 28px; }
    .solution-card-actions form { display: flex; }
    .solution-card-actions .btn {
        width: 53px;
        height: 53px;
        padding: 0;
        gap: 2px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
    }
    .solution-card-actions .btn svg { width: 18px; height: 18px; flex-shrink: 0; }
    .solution-card-actions .btn-label {
        font-size: 0.62rem;
        font-weight: 400;
        line-height: 1;
    }
}
