/* A near-black canvas with blue-gray light, inspired by the supplied Harness page.
   Loaded for screen media so exported and printed evidence uses its existing palette. */
:root {
  color-scheme: dark;
  --bg: #142135;
  --mist: #182b44;
  --panel: #191d24;
  --surface-raised: #242b35;
  --surface-input: #202730;
  --surface-hover: #293342;
  --ink-deep: #f1f4f9;
  --ink-soft: #b7c1cf;
  --text: var(--ink-deep);
  --ink: var(--ink-deep);
  --muted: var(--ink-soft);
  --action: #adccff;
  --blue: var(--action);
  --green: var(--action);
  --lime: var(--action);
  --teal: var(--action);
  --rule: #3a4656;
  --line: var(--rule);
  --tint: #293b52;
  --soft: var(--tint);
  --amber: #efc689;
  --red: #ffb3a4;
  --surface-shadow: 0 8px 24px rgb(0 0 0 / 13%);
}
html { background: var(--bg); }
body {
  min-height: 100dvh;
  background-color: var(--bg);
  background-image:
    linear-gradient(0deg, rgb(18 31 49 / 86%), transparent 42%),
    radial-gradient(ellipse 39% 76% at 94% 25%, #74808e 0%, #57687d 43%, transparent 100%),
    radial-gradient(ellipse 58% 38% at 46% 0%, #101923 0%, transparent 96%),
    linear-gradient(135deg, #11263e 0%, #193250 34%, #294566 65%, #394961 100%);
  background-repeat: no-repeat;
  background-size: 100% 100vh;
  background-attachment: fixed;
  color: var(--text);
}
.site-header, .topbar {
  background: rgb(13 20 29 / 85%);
  border-color: rgb(205 222 248 / 15%);
}
.header-inner .wordmark, .brand { color: var(--text); }
.header-inner .help-button, .header-inner nav a, .brand small, .privacy { color: #c3cddb; }
.header-inner nav a.active { color: #edf4ff; border-color: #adcaff; }
.app-footer, footer { color: #b7c1cf; border-color: var(--rule); }
body :is(input, select, textarea), body .task-card textarea, body .answer-input, body .group-search-box input {
  background-color: var(--surface-input); color: var(--text); border-color: #506079;
}
body :is(input, textarea)::placeholder { color: #b0bbcb; opacity: 1; }
input[type="checkbox"] { accent-color: #8cb4f2; }
body :is(a, button, input, textarea, select, summary):focus-visible { outline-color: #a6c8ff; }
body .primary, body .flow-dock .primary, body .file-button, body .archive-main-action {
  background: #4665a0; color: #fff; border-color: #6988bc;
}
body :is(.primary, .file-button, .archive-main-action):hover { background: #5274b4; }
body .secondary { background: var(--surface-raised); color: #d7e6ff; border-color: #52657e; }
body :is(.text-link, .text-button, .back-link, summary) { color: #bad5ff; }
body .skip-link { background: #e7effa; color: #172a43; }
body .icon-button { background: #303945; color: #e4ecf7; }
body dialog, body .sheet-heading {
  background: #1a2029; color: var(--text); border-color: #4c5a6d;
}
body dialog { box-shadow: 0 24px 80px rgb(0 0 0 / 45%); }
dialog::backdrop { background: rgb(0 0 0 / 58%); }
body :is(.panel, .card, .record-surface, .discovery-surface, .home-archive,
  .reason-option, .identity-fields, .existing-pick, .selected-file, .analysis-options, .analysis-stages,
  .record-picker-button, .group-option, .resume-message, .owner-evidence, .owner-next,
  .owner-finding-list, .owner-finding, .owner-gaps, .professional-details) {
  background: var(--panel); color: var(--text); border-color: var(--rule);
}
body :is(.home-greeting p, .compact-empty p, .demo-entry small, .home-count,
  .preparation summary, .flow-intro p, .field-hint, .reason-option small, .flow-nav,
  .flow-step, .upload-identity small, .upload-identity > span, .upload-note,
  .selected-file small, .record-summary, .selected-group small,
  .analysis-option-ready small, .analysis-option-ready em,
  .analysis-options summary, .analysis-options summary small, .analysis-options .setting-hint,
  .identity-consent, .group-search-box p, .group-option small, .group-empty, #record-preview p,
  .analysis-target > span, .analysis-progress > div > span, .analysis-subtitle,
  .analysis-persistence, .resume-flow > p:not(.flow-error),
  .result-page-header > p, .owner-summary-text, .owner-boundary,
  .owner-evidence > p, .owner-evidence-next ul, .owner-soc-card > p,
  .owner-section-heading > span, .owner-next > p, .owner-finding small,
  .owner-gaps > summary span:last-child, .owner-gap p,
  .professional-details > summary small, .owner-review-sheet .review-intro,
  .review-check-item p, .latest-review p, .latest-review time,
  .cell-picker-label, .reading-summary > div > span, .reading-summary small,
  .reading-summary .not-measured, .reading-caption, .channel-header h3 span,
  .no-fragments span, .sheet-content .review-intro) { color: var(--muted); }
body :is(.flow-nav > span:nth-child(2), .flow-step b, .selected-file strong, .selected-group, .selected-group strong, #record-preview strong,
  .identity-consent strong, .analysis-progress strong, .owner-kicker,
  .owner-soc-metrics strong, .channel-facts strong, .process-strip strong) { color: var(--text); }
body :is(.home-archive, .demo-symbol, .compact-empty > svg, .reason-icon,
  .analysis-option-ready > span, .resume-symbol, .task-glyph, .selected-file > span) {
  background: var(--tint); color: #c2dbff; border-color: var(--rule);
}
body :is(.upload-identity, .selected-file, #record-preview p, .group-option,
  .owner-boundary, .owner-evidence-next, .owner-finding + .owner-finding,
  .owner-more-findings, .owner-more-findings .owner-finding, .owner-gap,
  .professional-details .result-analysis, .review-check-item,
  .owner-review-sheet .review-box, .flow-nav, .reading-summary,
  .reading-summary > div, .result-utilities, .sheet-heading) { border-color: var(--rule); }
body :is(.file-choice, #record-preview, .saved-record-notice, .upload-zone, .case-goal,
  .latest-review, .no-fragments, .source-readout, .notice) {
  background: #222e3f; color: #d2dfee; border-color: #536783;
}
body .file-choice > span { background: #304762; color: #d4e7ff; }
body .file-choice small, body #record-preview span { color: var(--muted); }
body .detection-flow label:not(.check-row,.identity-consent,.file-choice,.sr-only) { color: #d1dbea; }
body .detection-flow :is(input:not([type="checkbox"]), select, textarea) { border-color: #506079; }
body .reason-option.selected { background: #273b54; border-color: #88addf; box-shadow: inset 3px 0 #88addf; }
body .reason-option.selected .reason-icon { color: #e0edff; background: #365477; }
body .reason-option.selected .reason-check { background: #6487bc; border-color: #a9c7f4; }
body .reason-check { border-color: #7c90ac; }
body .flow-error, body .review-save-error, body .notice.error {
  color: #ffc1b3; background: #422b2c; border-color: #a3695f;
}
body .analysis-stages li { color: #b2bfce; }
body .analysis-stages li.done { color: #a8cfcd; }
body .analysis-stages li.active { color: #d0e3ff; }
body .analysis-stages li.active > span { background: #334d6c; border-color: #7098c7; }
body .analysis-stages li > span { border-color: #5d6c80; }
.progress-ring-track { stroke: #39495e; }
.progress-ring-value { stroke: #a6caff; }
body .start-detection, body .start-detection:hover {
  background: radial-gradient(ellipse at 88% 5%, #496385, transparent 65%), #152233;
  border-color: #647c9a; box-shadow: 0 14px 35px rgb(0 0 0 / 20%);
}
body .start-detection small { color: #d0deef; }
body .start-detection .start-symbol { background: #354b67; color: #e0eeff; }
body .start-detection .start-arrow { background: #e7effa; color: #1b314b; }
body .owner-result-summary { background: #283a50; border-color: #8bb7ed; }
body .owner-result-summary.owner-kind-findings { background: #3b3226; border-color: #dbb275; }
body .owner-result-summary.owner-kind-limited { background: #323039; border-color: #b1a1b6; }
body .owner-evidence-screening_only { background: #29271f; border-color: #7f704c; }
body .owner-evidence-insufficient { background: #302525; border-color: #976c5d; }
body .owner-evidence-badge, body .owner-evidence-chip { background: #303a48; color: #d6e0ed; }
body .owner-evidence-screening_only .owner-evidence-badge,
body .owner-evidence-chip.partial { background: #4a3c24; color: #f4d79d; }
body .owner-evidence-insufficient .owner-evidence-badge { background: #4c302e; color: #f5c8b6; }
body .owner-evidence-chip.ready { background: #283e37; color: #c0dfcd; }
body .owner-soc-card { background: #202d40; border-color: #4c6b93; }
body .owner-soc-metrics > div { background: #293b52; border-color: #506884; }
body .owner-soc-head h2 { color: #c3ddff; }
body .owner-soc-badge { color: #d2e5ff; background: #2a405c; border-color: #668bb7; }
body .owner-soc-metrics span { color: #c2cfdf; }
body .owner-cell-symbol { background: #493d2b; color: #f2d197; }
body .owner-soc-warning, body .event-context { color: #eccb94; }
body :is(.owner-utilities button, .result-utilities .text-link, .followup-item summary) { color: #bdd6f8; }
body .detection-records {
  --records-ink: var(--text); --records-muted: var(--muted);
  --records-line: var(--rule); --records-blue: #b9d4ff;
}
body .battery-archive {
  --archive-muted: var(--muted); --archive-line: var(--rule); --archive-blue: #b9d4ff;
}
body :is(.detection-records .record-bucket, .detection-records .record-subfilters button,
  .detection-records .records-unknown, .detection-records .record-list,
  .detection-records .records-empty, .detection-records .records-empty button,
  .detection-records .records-more, .archive-surface, .archive-empty) { background: var(--panel); }
body .detection-records .record-bucket[aria-pressed="true"],
body .detection-records .record-subfilters button[aria-pressed="true"],
body .detection-records .records-unknown[aria-pressed="true"] {
  background: #354e70; border-color: #93b4e1; color: #fff;
}
body .detection-records .record-bucket[aria-pressed="true"] :is(strong, svg) { color: #fff; }
body :is(.detection-records .records-search input, .archive-search input) { background: var(--surface-input); }
body .detection-records .record-glyph, body .archive-glyph,
body .detection-records .records-empty > span { background: #2a3c54; color: #c0d9ff; }
body .detection-records .record-glyph-synthetic, body .detection-records .record-source,
body .archive-source-synthetic .archive-glyph { background: #393046; color: #dfc9fa; }
body .archive-latest { background: #222f42; }
body .detection-records .record-state, body .archive-status, body .pill { background: #343d4b; color: #dae2ee; }
body .detection-records [data-tone="review"] .record-state,
body .pill.status-review, body .archive-status.review, body .pill.attention,
body .pill.demo { background: #4a3c25; color: #f4d49c; }
body .detection-records [data-tone="active"] .record-state,
body .pill.status-active, body .archive-status.active, body .pill.live { background: #2c4160; color: #c5dcff; }
body .detection-records [data-tone="reviewed"] .record-state,
body .pill.status-reviewed, body .archive-status.reviewed { background: #2b4239; color: #c4e4d2; }
body .pill.status-pending, body .archive-status.pending,
body .pill.status-unknown, body .archive-status.unknown { background: #343d4b; color: #dae2ee; }
body .detection-records .records-connection, body .notice.amber { background: #423723; color: #f3d39b; }
body .result-tabs, body .inspection-chart .inspection-chart__modes { background: #111923; }
body .result-tabs button { color: var(--muted); }
body .result-tabs button[aria-selected="true"] { background: #344763; color: #eff5ff; }
body .result-analysis .channel { background: #222c39; color: var(--text); border-color: #4a5a71; }
body .result-analysis .channel.active { background: #354e70; color: #eef5ff; border-color: #9abbeb; }
body .source-readout :is(p, .source-value) { color: #d2dfee; }
body .inspection-chart {
  --chart-ink: var(--text); --chart-muted: #bdcadc; --chart-surface: #263247;
  --chart-blue: #9fc6ff; --chart-gray: #b1bdcd;
}
body .inspection-chart .inspection-chart__plot { background: #141d2b; }
body .inspection-chart [data-chart-mode][aria-pressed="true"] { background: #344b6b; color: #e4efff; }
body .inspection-chart .inspection-chart__grid { stroke: #3a4b63; }
body .inspection-chart [data-series="cell"] { --series-color: #cbe0ff; }
body .inspection-chart .inspection-chart__body:has([data-series="cell"]) [data-series="max"] { --series-color: #85b5f5; }
body .inspection-chart .inspection-chart__cursor { stroke: #bed5f3; }
body .inspection-chart .inspection-chart__dot { stroke: #172232; }
body :is(.flow-spinner, .analysis-orb) { border-color: #374961; border-top-color: #a3c8ff; }
body :is(.progress-track, .skeleton) { background: #29374a; }

/* Map tiles and recorded route geometry retain their own geographic palette. */
body .campus { --map-ink: var(--text); --map-edge: #425469; }
body .campus-setup { background: #232f3f; color: var(--text); }
body :is(.campus-setup .section-head p, .campus-picker label) { color: #c5cfdd; }
body .campus-picker select { color: var(--text); }
body .campus .map-actions .secondary { background: var(--surface-raised); }
body .campus-picker .secondary { background: #2d3b4f; color: #e3edfa; border-color: #63758d; }
body #add-campus { border-color: #465970; }
body #add-campus summary { color: #c3dbfd; }
body .campus .map-frame { background: #202a37; }
body .map-toolbar { background: #182536; }
body .map-toolbar .map-tool { color: #e5efff; }
body #live-position[aria-pressed="true"] { background: #2c4945; color: #cbf1e5; border-color: #79b4a6; }
body .campus .map-actions .primary { background: #4665a0; color: white; }
body #demo-toggle[aria-pressed="true"] { background: #355480; }
body .campus .boards > div { background: #253245; }
body #challenge time, body .campus .avatar { color: #c4dcff; }
body #challenge li:first-child { border-color: #a1bfeb; }
body .campus .avatar { background: #344e6d; }
body .campus #map-credit:not([hidden]) { background: #1c2736; color: #c4d2e6; }

/* Professional worksheet surfaces use the same screen palette. */
body .intro, body .section-title { border-color: var(--rule); }
body :is(.intro .eyebrow, #settings > summary, .reference-settings > summary) { color: #c0d7f6; }
body .privacy { border-color: #4f627c; }
body .section-title .step { background: #354f72; color: #ecf4ff; }
body .section-title .badge, body .chips button { background: #293649; color: #d2e1f5; border-color: #506783; }
body .import-area { background: #202c3e; border-color: #657e9e; }
body .task-card textarea { border-left-color: #8baad0; }
body .response-card, body .case-card, body #results { border-top-color: #7196c5; }
body .quiet-card { background: #24364d; border-color: #4c6484; }
body .quiet-card .eyebrow { color: #d6e8ff; }
body .quiet-card .hint { color: #c4d2e4; border-color: #4f6582; }
body .process span { color: #c5d3e5; }
body .process li::before { background: #acc7eb; color: #162b46; }
body .process li:not(:last-child)::after { background: #6e8bb2; }
body :is(.response-counts > div, .metric, .next-box, .cell, .case-item) { background: #253347; border-color: #4c6380; }
body :is(.response-counts span, .response-cell span, .case-item span, .case-item small, .visit p) { color: var(--muted); }
body :is(.metric strong, .cell strong, .ai-understanding) { color: #d7e8ff; }
body .response-cell { background: #222e40; color: var(--text); border-color: #506681; }
body .response-cell.flagged, body .event-link, body .cell.missing { background: #3d3528; color: #f7ddb0; border-color: #8a734c; }
body .cell.missing strong { color: #f4d49c; }
body .response-cell[aria-pressed="true"] { outline-color: #c1daff; }
body .case-item.selected { background: #344d70; border-color: #91b4e6; }
body .error { color: #ffb9aa !important; }
body #chart { background: #172232; }
body :is(#chart, #response-chart, .residual-disclosure, .consistency-detail) svg text { fill: #c5d3e5; }
body .residual-disclosure svg rect[fill="#edf3fa"] { fill: #243b57; }
body .residual-disclosure svg path[stroke="#0066cc"] { stroke: #b9d7ff; }
body #chart svg line { stroke: #46576d; }
body #chart svg path[stroke="#1c7765"] { stroke: #a4d2bf; }
@media (hover: hover) {
  body :is(.demo-entry, .archive-battery-row, .archive-history-row, .detection-record-row,
    .home-archive, .detection-records .records-more, .detection-records .records-empty button,
    .owner-finding, .group-option):hover { background: var(--surface-hover); }
  body .map-toolbar .map-tool:hover { background: #354b69; }
  body .start-detection:hover .start-arrow { background: white; }
}
@media (max-width: 680px) {
  body .bottom-nav, body .flow-dock { background: #171f2b; border-color: #42536b; }
  body .bottom-nav a { color: #bac7da; }
  body .bottom-nav a.active { color: #e9f3ff; background: #344d70; }
}
