html:has(.health-layout) { scrollbar-gutter: stable; }
.top-admin-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.top-admin-link:hover { color: var(--primary); }
.container.health-layout { width: min(1760px, calc(100% - 64px)); padding: 16px 0 32px; }
.health-layout > .page-tabs { margin-bottom: 12px; }
body:has(#dashboardPage:not(.hidden)) .topbar { padding-block: 14px; }
.health-layout:has(> #dashboardPage:not(.hidden)) { padding-top: 10px; }
.health-layout:has(> #dashboardPage:not(.hidden)) > .page-tabs { margin-bottom: 8px; }
.health-layout:has(> #dashboardPage:not(.hidden)) > .page-tabs .page-tab { padding-block: 8px; }
.health-hero { grid-template-columns: minmax(0, 1fr) fit-content(300px); align-items: center; gap: 0 16px; margin-bottom: 10px; }
.health-hero h1 { margin: 0; font-size: 24px; }
#oneClickPage h1 { margin: 10px 0; font-size: 32px; }
.health-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.health-stats .stat { padding: 14px 18px; }
.health-stats strong { margin-top: 5px; font-size: 26px; overflow-wrap: anywhere; }

.project-list { display: grid; gap: 10px; }
.project-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; min-width: 0; margin: 0; padding: 8px 12px; }
.project-row-head, .project-latest { grid-column: 1 / -1; }
.project-row:has(> details[open]) > details { grid-column: 1 / -1; }
.project-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; padding: 4px 8px; border-left: 3px solid color-mix(in srgb, var(--primary) 65%, var(--line)); background: color-mix(in srgb, var(--primary) 7%, var(--panel-strong)); }
.project-row-head > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; min-width: 0; }
.project-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.project-row-head h2 { min-width: 0; margin: 0; font-size: 16px; line-height: 1.45; font-weight: 750; overflow-wrap: anywhere; }
.project-row-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.project-row-head p strong { color: var(--text); font-size: 16px; line-height: 1.45; font-weight: 750; }
.project-kicker { color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.project-state { flex: 0 0 auto; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-subtle); font-size: 11px; font-weight: 700; }
.project-state.normal { border-color: color-mix(in srgb, var(--primary), transparent 45%); color: var(--primary); background: color-mix(in srgb, var(--primary), transparent 90%); }
.project-state.warning { border-color: color-mix(in srgb, var(--warning), transparent 45%); color: var(--warning); background: color-mix(in srgb, var(--warning), transparent 91%); }
.project-state.error { border-color: color-mix(in srgb, var(--danger), transparent 45%); color: var(--danger); background: color-mix(in srgb, var(--danger), transparent 91%); }
.project-state.running, .project-state.queued { border-color: color-mix(in srgb, var(--blue), transparent 45%); color: var(--blue); background: color-mix(in srgb, var(--blue), transparent 91%); }
.project-check { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 16px; margin-bottom: 10px; padding: 8px 10px; border-left: 2px solid var(--blue); background: color-mix(in srgb, var(--blue), transparent 94%); color: var(--text); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.project-check strong { color: var(--blue); }
.project-check small { flex-basis: 100%; color: var(--muted); font-size: 11px; }
.project-stats { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 0 0 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.project-stats .stat { display: flex; align-items: baseline; gap: 8px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.project-stats .stat span, .project-stats .stat strong { margin: 0; font-size: 12px; }
.project-latest { min-width: 0; margin-bottom: 3px; }
.project-latest-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 3px; }
.project-latest h3 { margin: 0; font-size: 12px; line-height: 18px; color: var(--muted); }
.project-latest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.latest-result { display: grid; grid-template-rows: minmax(26px, auto) 18px minmax(44px, auto) 40px auto; align-content: start; gap: 5px; min-width: 0; }
:is(.project-latest-grid, .one-click-model-summary) > .latest-result { padding-left: 10px; border-left: 3px solid var(--line); }
:is(.project-latest-grid, .one-click-model-summary) > .latest-result[data-detector="chanshui"] { border-left-color: #78b8a8; }
:is(.project-latest-grid, .one-click-model-summary) > .latest-result[data-detector="fingerprint"] { border-left-color: #83a8d3; }
:is(.project-latest-grid, .one-click-model-summary) > .latest-result[data-detector="cctest"] { border-left-color: #b49bb8; }
.latest-result-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: 17px; font-weight: 700; }
.latest-status { color: var(--muted); font-size: 12px; font-weight: 400; }
.latest-result.normal .latest-status { color: var(--primary); }
.latest-result.warning .latest-status { color: var(--warning); }
.latest-result.error .latest-status, .latest-result.error .latest-result-value { color: var(--danger); }
.latest-result.running .latest-status { color: var(--blue); }
.latest-result-value { align-self: center; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.latest-probability-label { color: var(--muted); font-size: 12px; }
.fingerprint-probability-result .latest-result-value, .ability-score-result .latest-result-value { font-size: 36px; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--text); }
.detector-meta .fingerprint-probability strong, .detector-meta .ability-score strong { font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.latest-result-caption { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: var(--muted); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.latest-result-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12px; line-height: 18px; }
.latest-round-status { display: inline-flex; align-items: center; gap: 7px; color: var(--blue); font-size: 13px; font-weight: 600; }
.latest-round-status i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; }
.latest-round-status.running i { animation: pulse 1.1s infinite; }
.latest-round-note { color: var(--blue); font-size: 12px; line-height: 18px; }
:is(.project-latest, .one-click-model-summary) .latest-result { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(22px, auto) minmax(32px, auto) 18px auto; grid-template-areas: "head head" "value label" "caption caption" "foot foot"; gap: 1px 8px; }
:is(.project-latest, .one-click-model-summary) .latest-result-head { grid-area: head; font-size: 15px; line-height: 22px; }
:is(.project-latest, .one-click-model-summary) .latest-probability-label { grid-area: label; align-self: center; font-size: 11px; }
:is(.project-latest, .one-click-model-summary) .latest-result-value { grid-area: value; min-width: 0; font-size: 16px; }
:is(.project-latest, .one-click-model-summary) .fingerprint-probability-result .latest-result-value, :is(.project-latest, .one-click-model-summary) .ability-score-result .latest-result-value { font-size: 28px; line-height: 32px; }
:is(.project-latest, .one-click-model-summary) .latest-result-caption { grid-area: caption; display: block; font-size: 12px; line-height: 18px; white-space: nowrap; text-overflow: ellipsis; }
:is(.project-latest, .one-click-model-summary) .latest-result-foot { grid-area: foot; font-size: 11px; line-height: 16px; }
:is(.project-latest, .one-click-model-summary) .latest-round-note { grid-column: 1 / -1; font-size: 11px; line-height: 16px; }
.project-latest .latest-round-status { font-size: 12px; line-height: 18px; }
.project-results { min-width: 0; border-top: 1px solid var(--line); font-size: 12px; }
.project-results > summary { padding: 3px 0; cursor: pointer; color: var(--primary); font-weight: 700; line-height: 18px; }
.project-results > summary small { margin-left: 12px; color: var(--muted); font-size: 11px; font-weight: 400; }
.project-results > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.project-results > summary .results-collapse, .project-results[open] > summary .results-expand { display: none; }
.project-results[open] > summary .results-collapse { display: inline; }
.project-results-body { min-width: 0; padding-top: 3px; }
.project-detectors.detector-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.project-detectors .detector-card { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.detector-report { min-width: 0; }
.project-history { min-width: 0; border-top: 1px solid var(--line); font-size: 12px; }
.project-history > summary { width: fit-content; padding: 3px 0; cursor: pointer; color: var(--primary); font-weight: 700; line-height: 18px; }
.project-history-table { max-height: 330px; margin-top: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.project-history-table table { margin: 0; }
.project-history-table th { position: sticky; top: 0; background: var(--panel-strong); }
.project-history-empty { margin-top: 10px; padding: 24px; }
.history-report { min-width: 260px; max-width: 600px; white-space: normal; }
.history-report > .chanshui-report, .history-report > .fingerprint-report, .history-report > .cctest-report { margin-top: 14px; }
.history-report .report-section > summary, .history-report .report-question > summary { width: auto; color: var(--text); }

.detector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.detector-card { min-width: 0; margin: 0; display: grid; align-content: start; gap: 8px; }
.detector-card .card-head { min-width: 0; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; align-items: center; }
.detector-card .card-head time { font-size: 11px; }
.detector-card h2 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 17px; }
.detector-source { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.detector-source strong { font-weight: 600; }
.detector-source a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.detector-source a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.history-report > .detector-source { margin-top: 10px; }
.detector-conditions { min-width: 0; padding-top: 9px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; }
.conditions-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.conditions-heading h3 { margin: 0; color: var(--text); font-size: 12px; }
.conditions-heading a { color: var(--primary); text-underline-offset: 3px; }
.conditions-heading a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.conditions-record { margin: 5px 0 0; }
.conditions-record strong { color: var(--text); margin-right: 5px; }
.conditions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 8px 18px; margin: 8px 0; }
.conditions-grid > div { min-width: 0; }
.conditions-grid dt { margin-bottom: 3px; color: var(--text); font-weight: 600; }
.conditions-grid dd { margin: 0; }
.conditions-boundary { margin: 0; }
.history-report > .detector-conditions { margin-top: 12px; }
.detector-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 12px color-mix(in srgb, var(--muted), transparent 35%); }
.detector-card.normal .detector-mark { background: var(--primary); }
.detector-card.warning .detector-mark { background: var(--warning); }
.detector-card.error .detector-mark { background: var(--danger); }
.detector-card.running .detector-mark { background: var(--blue); animation: pulse 1.1s infinite; }
.detector-verdict { min-width: 0; display: grid; align-content: start; gap: 3px; padding: 0; text-align: left; }
.detector-verdict strong { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.detector-verdict small { color: var(--muted); font-size: 11px; }
.detector-card.normal .detector-verdict strong { color: var(--primary); }
.detector-card.warning .detector-verdict strong { color: var(--warning); }
.detector-card.error .detector-verdict strong { color: var(--danger); }
.detector-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; }
.detector-meta div { min-width: 0; padding: 5px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.detector-meta span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.detector-meta strong { display: block; font-size: 12px; line-height: 1.5; }
.detector-details summary { cursor: pointer; color: var(--primary); font-size: 11px; font-weight: 600; }
.detector-details pre { max-height: 280px; margin: 12px 0 0; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-inset); white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.55 Consolas, monospace; }

.chanshui-report, .fingerprint-report, .cctest-report { min-width: 0; }
.chanshui-report h3, .fingerprint-report h3, .cctest-report h3 { margin: 0 0 7px; font-size: 13px; }
.cctest-report h4 { margin: 9px 0 4px; font-size: 12px; color: var(--text); }
.cctest-scores.report-strip { grid-auto-columns: min(180px, 85%); align-items: stretch; margin: 0; }
.cctest-scores > div { display: grid; grid-template-rows: 36px auto; gap: 6px; padding: 8px 10px; }
.cctest-scores dt { font-size: 13px; line-height: 18px; font-weight: 700; overflow-wrap: anywhere; }
.cctest-scores dd { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 600; font-variant-numeric: tabular-nums; }
.cctest-report .fingerprint-facts { gap: 5px 20px; }
.cctest-report .fingerprint-facts > div { flex-wrap: wrap; }
.cctest-report .cctest-metrics, .cctest-report .cctest-audit { margin-top: 0; }
.cctest-report .report-error, .cctest-report .report-warning, .cctest-report .report-note { margin: 6px 0 0; }
.fingerprint-table-wrap { max-height: 196px; overflow-y: auto; overflow-x: scroll; border-top: 1px solid var(--line); scrollbar-color: auto; }
.fingerprint-table-wrap:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.fingerprint-table-wrap table { width: 100%; min-width: 430px; margin: 0; table-layout: fixed; font-size: 12px; }
.fingerprint-table-wrap th, .fingerprint-table-wrap td { padding: 5px 7px; font-size: 12px; line-height: 18px; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.fingerprint-table-wrap thead th { position: sticky; top: 0; z-index: 1; background: var(--panel-strong); color: var(--muted); font-size: 11px; }
.fingerprint-table-wrap th:first-child { width: 42px; }
.fingerprint-table-wrap th:nth-child(3) { width: 72px; }
.fingerprint-table-wrap th:last-child { width: 100px; }
.fingerprint-table-wrap td:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.fingerprint-table-wrap td:last-child, .fingerprint-table-wrap th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.fingerprint-table-wrap tbody td:last-child { font-size: 16px; font-weight: 600; }
.fingerprint-table-wrap tbody tr:first-child td:last-child { font-size: 19px; }
.fingerprint-table-wrap tbody th { position: static; background: none; font-weight: 600; color: var(--text); }
.fingerprint-table-wrap tbody tr:first-child th, .fingerprint-table-wrap tbody tr:first-child td:last-child { color: var(--primary); }
.fingerprint-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 7px 0 0; font-size: 11px; }
.fingerprint-facts > div { min-width: 0; display: flex; gap: 6px; }
.fingerprint-facts dt { color: var(--muted); }
.fingerprint-facts dd { margin: 0; overflow-wrap: anywhere; }
.fingerprint-note { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.report-strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(240px, 90%); align-items: start; width: 100%; min-width: 0; padding-bottom: 6px; overflow-x: scroll; overscroll-behavior-x: contain; scrollbar-color: auto; }
.report-strip::-webkit-scrollbar, .fingerprint-table-wrap::-webkit-scrollbar { height: 10px; width: 10px; }
.report-strip::-webkit-scrollbar-track, .fingerprint-table-wrap::-webkit-scrollbar-track { background: var(--surface-inset); }
.report-strip::-webkit-scrollbar-thumb, .fingerprint-table-wrap::-webkit-scrollbar-thumb { background: var(--muted); border: 2px solid var(--surface-inset); border-radius: 6px; }
.report-section { min-width: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.report-section:first-child { border-left: 1px solid var(--line); }
.report-section > summary { position: relative; display: grid; grid-template-rows: 18px 64px 16px; gap: 4px; cursor: pointer; padding: 8px 10px; list-style: none; }
.report-section > summary::before { content: '+'; position: absolute; top: 8px; right: 10px; color: var(--muted); }
.report-section[open] > summary::before { content: '−'; }
.report-section-title { min-width: 0; padding-right: 20px; font-size: 13px; line-height: 18px; font-weight: 700; overflow-wrap: anywhere; }
.report-section-status small { display: block; margin: 0; font-size: 11px; line-height: 14px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.report-section-status { display: grid; grid-template-rows: 18px 28px 14px; gap: 2px; text-align: left; font-size: 12px; line-height: 18px; }
.report-section-status .report-section-brief { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.report-section-action { color: var(--primary); font-size: 11px; line-height: 16px; font-weight: 600; }
.report-collapse, .report-section[open] .report-expand { display: none; }
.report-section[open] .report-collapse { display: inline; }
.report-section-body { padding: 0 10px 10px; min-width: 0; max-height: 300px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--muted) var(--surface-inset); }
.report-strip:focus-visible, .report-section-body:focus-visible, .report-section > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.report-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 16px; margin: 4px 0 12px; }
.report-facts > div { min-width: 0; overflow-wrap: anywhere; }
.report-facts dt { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.report-facts dd { margin: 0; font-size: 13px; font-weight: 600; }
.report-note { white-space: pre-line; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.report-normal { color: var(--primary); }
.report-warning { color: var(--warning); }
.report-error { color: var(--danger); overflow-wrap: anywhere; }
.report-muted { color: var(--muted); }
.report-table-wrap { overflow: auto; max-height: 260px; margin-top: 10px; }
.report-table-wrap table { width: 100%; font-size: 12px; table-layout: fixed; }
.report-table-wrap th, .report-table-wrap td { padding: 8px; white-space: normal; overflow-wrap: anywhere; }
.report-question { border-top: 1px dashed var(--line); margin-top: 8px; }
.report-question > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; cursor: pointer; padding: 10px 0; font-size: 13px; }
.report-question > summary span { min-width: 0; overflow-wrap: anywhere; }
.report-question > summary b { flex-shrink: 0; font-size: 12px; }
.report-question-body { padding-bottom: 10px; }
.report-text h4 { margin: 12px 0 5px; font-size: 12px; color: var(--muted); }
.report-text pre { margin: 0; padding: 10px 12px; border-left: 2px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; background: var(--surface-inset); font: inherit; font-size: 13px; line-height: 1.65; }
.report-text:nth-of-type(3) pre { border-left-color: var(--primary); }
.report-method { margin-top: 6px; color: var(--muted); font-size: 11px; }
.report-method h4 { margin: 0 0 4px; color: var(--text); font-size: 12px; }
.report-method .report-note { margin: 0; }

.history-card { padding: 20px; }
.history-tabs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.history-tab { flex: 0 0 auto; padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface-subtle); }
.history-tab.active { border-color: var(--selected-border); color: var(--on-primary); background: var(--primary); font-weight: 800; }
.history-card .table-wrap { max-height: 420px; overflow: auto; }
.history-card th { position: sticky; top: 0; background: var(--panel-strong); }

.health-connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.detector-choice-head { margin-top: 26px; align-items: flex-end; }
.detector-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.detector-choice { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-subtle); }
.detector-choice.disabled { opacity: .52; }
.detector-choice label { display: flex; align-items: flex-start; gap: 10px; color: var(--text); font-weight: 800; }
.detector-choice input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); }
.detector-choice p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.detector-choice small { color: var(--muted); line-height: 1.55; }
.choice-state { width: fit-content; padding: 4px 8px; border-radius: 999px; background: rgba(148, 163, 184, .12); font-size: 11px; }
.choice-state.ready { color: var(--primary); background: rgba(32, 201, 151, .12); }
.choice-state.blocked { color: var(--warning); background: rgba(255, 212, 59, .1); }
.consent-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 13px 15px; border-left: 3px solid var(--warning); border-radius: 8px; background: rgba(255, 212, 59, .07); color: var(--text); line-height: 1.6; }
.consent-row input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); }

.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-inset); }
.progress-track div { width: 0; height: 100%; border-radius: inherit; background: var(--primary); transition: width .3s ease; }
.one-click-results-card { padding: 12px 14px; }
.one-click-results-card > .card-head { margin-bottom: 10px; }
.one-click-results-card > .card-head h2 { font-size: 18px; }
.one-click-detector-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.one-click-detector-results .detector-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--surface-subtle); }
.selected-models { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.selected-model { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 7px 4px 10px; border: 1px solid var(--selected-border); border-radius: 6px; background: var(--surface-subtle); overflow-wrap: anywhere; }
.selected-model button { flex: 0 0 auto; border: 0; padding: 0 3px; color: var(--muted); background: transparent; cursor: pointer; font-size: 18px; line-height: 1; }
.model-picker { position: relative; min-width: 0; }
.model-choices { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 4px 12px; max-height: 260px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-strong); box-shadow: var(--site-shadow); }
.model-choices label { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 4px; }
.model-choices input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--primary); }
.model-choices label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-choices .hint, .model-choices .model-manual-add { grid-column: 1 / -1; }
.model-choices .model-manual-add { justify-self: start; }
.one-click-model { min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.one-click-model-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.one-click-model-head h3 { min-width: 0; margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.one-click-model-head span { color: var(--muted); font-size: 12px; }
.one-click-model-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; margin: 0 0 6px; padding: 0; list-style: none; }
.one-click-model > details > summary { padding: 3px 0; cursor: pointer; color: var(--primary); font-size: 12px; line-height: 18px; font-weight: 600; }
.one-click-model-details { display: grid; gap: 12px; margin-top: 10px; }
.one-click-model-error { color: var(--danger); overflow-wrap: anywhere; }

/* Category tints are separate from the verdict's success/warning/error colors. */
.detector-card[data-detector="chanshui"] { --detector-accent: #78b8a8; }
.detector-card[data-detector="fingerprint"] { --detector-accent: #83a8d3; }
.detector-card[data-detector="cctest"] { --detector-accent: #b49bb8; }
.project-detectors .detector-card[data-detector], .one-click-detector-results .detector-card[data-detector] {
  background: color-mix(in srgb, var(--detector-accent, var(--line)) 13%, var(--panel-strong));
  border-color: color-mix(in srgb, var(--detector-accent, var(--line)) 32%, var(--line));
  box-shadow: inset 3px 0 color-mix(in srgb, var(--detector-accent, var(--line)) 65%, var(--panel-strong));
}
.detector-card .report-strip, .detector-card .fingerprint-table-wrap { background: var(--surface-subtle); }
.detector-card .report-method, .detector-card .detector-conditions {
  padding: 8px 10px;
  border-left: 2px solid var(--line);
  background: var(--surface-subtle);
}

@media (min-width: 1101px) {
  .detector-choice-grid[data-detector-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detector-choice-grid[data-detector-count="1"] { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1100px) {
  .detector-grid, .detector-choice-grid { grid-template-columns: 1fr; }
  .health-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .container.health-layout { width: calc(100% - 24px); padding: 12px 0 28px; }
  .health-hero { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .health-hero h1 { font-size: 22px; }
  .health-hero .live { font-size: 10px; }
  #oneClickPage h1 { font-size: 28px; }
  .health-stats, .health-connection-grid { grid-template-columns: 1fr; }
  .project-row { padding: 10px; column-gap: 10px; }
  .project-row-head { gap: 6px; flex-wrap: wrap; padding: 5px 8px; }
  .project-row-head > div { flex: 1 1 220px; }
  .project-state { justify-self: start; }
  .project-results > summary small { display: none; }
  :is(.project-latest, .one-click-model-summary) .fingerprint-probability-result .latest-result-value, :is(.project-latest, .one-click-model-summary) .ability-score-result .latest-result-value { font-size: 26px; }
  .detector-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .latest-result-head { font-size: 16px; }
  .fingerprint-probability-result .latest-result-value, .ability-score-result .latest-result-value { font-size: 32px; }
  .detector-choice-head { align-items: flex-start; }
  .detector-choice-head .btn { width: 100%; }
}
