/* Contrast pairs checked by tests/portal-a11y.node-test.mjs:
{
  "pairs": [
    {"name":"base text","foreground":"#f2f5f3","background":"#101614"},
    {"name":"muted text","foreground":"#c4d0ca","background":"#101614"},
    {"name":"card text","foreground":"#f2f5f3","background":"#1b2520"},
    {"name":"muted card text","foreground":"#c4d0ca","background":"#1b2520"},
    {"name":"link","foreground":"#7dd3c7","background":"#101614"},
    {"name":"primary button","foreground":"#ffffff","background":"#0b5f4f"},
    {"name":"warning text","foreground":"#ffcf70","background":"#332811"},
    {"name":"error text","foreground":"#ffaaa2","background":"#351b19"},
    {"name":"border focus","foreground":"#8bd7ff","background":"#101614"},
    {"name":"dark card accent text","foreground":"#ffcf70","background":"#332811"},
    {"name":"dark danger text","foreground":"#ffaaa2","background":"#351b19"},
    {"name":"dark positive text","foreground":"#b8f0c5","background":"#193c28"},
    {"name":"dark blue-slate text","foreground":"#ffffff","background":"#405063"},
    {"name":"dark card link","foreground":"#7dd3c7","background":"#1b2520"}
  ]
}
*/
@media (prefers-color-scheme: dark) {
  .status-main,
  .rp-main {
    color: #f2f5f3;
    background: #101614;
  }
  .status-main .st-lede,
  .status-main .st-kpi small,
  .status-main .st-muted,
  .rp-main .rp-lede,
  .rp-main .rp-proof span,
  .rp-main .rp-how small,
  .rp-main .rp-meta {
    color: #c4d0ca;
  }
  .status-main .st-pill,
  .status-main .st-kpi,
  .status-main .st-card,
  .rp-main .portal-tabs,
  .rp-main .rp-how li,
  .rp-main .rp-card,
  .rp-main .rp-workspace,
  .rp-main .hx-card {
    color: #f2f5f3;
    background: #1b2520;
    border-color: #506158;
  }
  .status-main .st-card h2,
  .status-main .st-kpi strong,
  .status-main .st-label,
  .status-main .st-ticks li,
  .rp-main .rp-group h2,
  .rp-main .rp-card h3,
  .rp-main .rp-how strong,
  .rp-main .hx-head h3,
  .rp-main .hx-share h3 {
    color: #f2f5f3;
  }
  .status-main a,
  .rp-main a,
  .status-main .st-suggest button,
  .rp-main .portal-tabs a,
  .rp-main .hx-raw summary {
    color: #7dd3c7;
  }
  .status-main .st-ask textarea,
  .status-main .customer-invite-form select,
  .status-main .customer-invite-result input,
  .status-main .st-btn,
  .status-main .st-suggest button,
  .rp-main .portal-signout,
  .rp-main .hx-del,
  .rp-main .hx-share-form select,
  .rp-main .hx-share-result input,
  .rp-main .rp-qbr-inputs input,
  .rp-main .rp-workspace .exchange-chat-approval-actions button,
  .rp-main .rp-workspace .m365-scorecard-actions button,
  .rp-main .rp-workspace .report-export-label + button {
    color: #f2f5f3;
    background: #1b2520;
    border-color: #61736a;
  }
  .status-main .st-btn-primary,
  .rp-main .portal-tabs a[aria-current=page],
  .rp-main .rp-how li > span,
  .rp-main .rp-workspace .exchange-chat-approval-actions button:first-child {
    color: #ffffff;
    background: #0b5f4f;
    border-color: #0b5f4f;
  }
  .status-main .st-tag-warn,
  .status-main .st-out[data-tone=warn],
  .status-main .st-note,
  .rp-main .rp-note {
    color: #ffcf70;
    background: #332811;
  }
  .status-main .st-danger,
  .status-main .st-check,
  .status-main .st-btn-danger,
  .rp-main .hx-new,
  .rp-main .hx-del {
    color: #ffaaa2;
    background: #351b19;
    border-color: #8a4942;
  }
  .status-main button:focus-visible,
  .status-main input:focus-visible,
  .status-main .customer-invite-form select:focus-visible,
  .status-main .customer-invite-result input:focus-visible,
  .status-main textarea:focus-visible,
  .rp-main button:focus-visible,
  .rp-main input:focus-visible,
  .rp-main select:focus-visible,
  .rp-main textarea:focus-visible,
  .rp-main a:focus-visible {
    outline: 3px solid #8bd7ff;
    outline-offset: 2px;
  }
  .status-main .st-table th,
  .status-main .st-table td,
  .rp-main .hx-raw pre {
    color: #f2f5f3;
    background: #1b2520;
    border-color: #506158;
  }

  /* Keep every report, history, share, table, chat and status surface legible in dark mode. */
  .rp-main .exchange-chat-approval,
  .rp-main .m365-scorecard-report,
  .rp-main .identity-review-summary,
  .rp-main .app-credentials-review-summary,
  .rp-main .m365-scorecard-incomplete,
  .rp-main .m365-scorecard-how pre,
  .rp-main .m365-scorecard-flag,
  .rp-main .m365-scorecard-flag-high,
  .rp-main .m365-scorecard-flag-low,
  .rp-main .m365-scorecard-table thead th,
  .rp-main .m365-scorecard-table tbody tr:nth-child(even),
  .rp-main .m365-scorecard-unchecked,
  .rp-main .licence-note,
  .rp-main .licence-warning,
  .rp-main .rd,
  .rp-main .rd-lane,
  .rp-main .rd-area,
  .rp-main .rd-item,
  .rp-main .rd-play-item,
  .rp-main .reads-panel,
  .rp-main [class*="review-reads"],
  .rp-main .opspilot-customer-table-pagination,
  .rp-main .opspilot-customer-table-report > button,
  .rp-main .chat-message,
  .rp-main .chat-message-user,
  .rp-main .chat-plan,
  .rp-main .opspilot-grade-explainer,
  .rp-main .rd-exec,
  .rp-main .chat-answer-card,
  .rp-main .chat-plan-strip,
  .rp-main .hx-compare,
  .rp-main .chat-suggestions button {
    color: #f2f5f3;
    background: #1b2520;
    border-color: #506158;
  }

  .rp-main .exchange-chat-approval > strong,
  .rp-main .m365-scorecard-report h4,
  .rp-main [class*="-subhead"],
  .rp-main .m365-scorecard-flag strong,
  .rp-main .m365-scorecard-table th,
  .rp-main .m365-scorecard-table td,
  .rp-main .rd-item b,
  .rp-main .rd-play-item summary,
  .rp-main .hx-summary,
  .rp-main .hx-head h3,
  .rp-main .hx-share h3,
  .rp-main .opspilot-customer-table-blurb,
  .rp-main .opspilot-customer-table-search-label,
  .rp-main .report-export-label,
  .rp-main .chat-message h3 {
    color: #f2f5f3;
  }

  .rp-main .exchange-chat-approval p,
  .rp-main .m365-scorecard-meta,
  .rp-main .m365-scorecard-weight,
  .rp-main .m365-scorecard-evidence,
  .rp-main .m365-scorecard-action,
  .rp-main .m365-scorecard-table caption,
  .rp-main .m365-scorecard-unchecked li,
  .rp-main .rd-legend,
  .rp-main .rd-item p,
  .rp-main .rd-empty,
  .rp-main .rp-logo,
  .rp-main .rp-logo small,
  .rp-main .chat-character-count {
    color: #c4d0ca;
  }

  .rp-main .m365-scorecard-progress,
  .rp-main .rd-quick,
  .rp-main .st-ticks,
  .rp-main .st-out[data-tone=ok] {
    color: #b8f0c5;
    background: #193c28;
  }

  .rp-main .rd-area-high,
  .rp-main .rd-lane-now .rd-lane-head,
  .rp-main .m365-scorecard-grade-F,
  .rp-main .hx-grade-f,
  .rp-main .chat-could-not-check,
  .rp-main .st-check,
  .rp-main .st-btn-danger,
  .rp-main .st-out[data-tone=error] {
    color: #ffaaa2;
    background: #351b19;
    border-color: #8a4942;
  }

  .rp-main .rd-area-medium,
  .rp-main .rd-lane-next .rd-lane-head,
  .rp-main .m365-scorecard-incomplete,
  .rp-main .m365-scorecard-flag,
  .rp-main .m365-scorecard-grade-C,
  .rp-main .m365-scorecard-grade-D,
  .rp-main .hx-grade-c,
  .rp-main .hx-grade-d,
  .rp-main .licence-note,
  .rp-main .licence-warning,
  .rp-main .st-tag-warn,
  .rp-main .st-out[data-tone=warn] {
    color: #ffcf70;
    background: #332811;
    border-color: #81632a;
  }

  .rp-main .rd-later .rd-lane-head,
  .rp-main .rd-seg-other,
  .rp-main .rd-l-other::before,
  .rp-main .rd-bar {
    background: #405063;
  }
  .rp-main .rd-seg-high,
  .rp-main .rd-l-high::before { background: #8b2924; }
  .rp-main .rd-seg-medium,
  .rp-main .rd-l-medium::before { background: #76510a; }
  .rp-main .rd-seg-ok { background: #236a3a; }
  .rp-main .rd-lane-head { color: #ffffff; }
  .rp-main .rd-area-high { border-color: #8a4942; }
  .rp-main .rd-area-medium { border-color: #81632a; }

  .rp-main .st-pill,
  .rp-main .st-kpi,
  .rp-main .st-card,
  .rp-main .st-chip,
  .rp-main .st-table,
  .rp-main .st-suggest,
  .rp-main .st-ask,
  .rp-main .st-answer,
  .rp-main .portal-tabs,
  .rp-main .portal-signout,
  .rp-main .rp-welcome,
  .rp-main .hx-card,
  .rp-main .hx-raw pre,
  .rp-main .hx-del,
  .rp-main .st-btn-primary,
  .rp-main .st-btn-danger,
  .rp-main .st-out,
  .rp-main .m365-scorecard-grade,
  .rp-main .m365-scorecard-grade-B,
  .rp-main .m365-scorecard-grade-C,
  .rp-main .m365-scorecard-grade-D,
  .rp-main .hx-grade,
  .rp-main .hx-grade-b,
  .rp-main .hx-grade-c,
  .rp-main .hx-grade-d,
  .rp-main .hx-grade-f,
  .rp-main .rd-lane-later .rd-lane-head,
  .rp-main .opspilot-customer-table-empty,
  .rp-main .opspilot-customer-table-error,
  .rp-main .opspilot-customer-table-sort {
    border-color: #506158;
  }

  .rp-main .opspilot-customer-table-search,
  .rp-main .rp-logo input,
  .rp-main .hx-share-form select,
  .rp-main .hx-share-result input,
  .rp-main .chat-composer textarea {
    color: #f2f5f3;
    background: #1b2520;
    border-color: #61736a;
  }

  .rp-main .m365-scorecard-report > h3,
  .rp-main .m365-scorecard-report > h3 + .m365-scorecard-meta {
    color: #f2f5f3;
    background: #1b2520;
  }

  .rp-main .m365-scorecard-grade,
  .rp-main .m365-scorecard-grade-B,
  .rp-main .hx-grade,
  .rp-main .hx-grade-b,
  .rp-main .rd-lane-later .rd-lane-head,
  .rp-main .rd-seg-other {
    color: #ffffff;
    background: #405063;
  }
  .rp-main .m365-scorecard-grade-C,
  .rp-main .hx-grade-c { color: #ffcf70; background: #332811; }
  .rp-main .m365-scorecard-grade-D,
  .rp-main .hx-grade-d { color: #ffcf70; background: #332811; }
  .rp-main .m365-scorecard-grade-F,
  .rp-main .hx-grade-f { color: #ffaaa2; background: #351b19; }

  .rp-main .portal-tabs a:hover,
  .rp-main .portal-signout:hover:not(:disabled),
  .rp-main .chat-message-user,
  .rp-main .chat-suggestions button {
    color: #7dd3c7;
    background: #1b2520;
  }
  .rp-main .st-btn-primary,
  .rp-main .portal-tabs a[aria-current=page],
  .rp-main .opspilot-customer-table-pagination button,
  .rp-main .opspilot-customer-table-report > button,
  .rp-main .chat-plan button,
  .rp-main .chat-suggestions button,
  .rp-main .chat-send {
    color: #ffffff;
    background: #0b5f4f;
    border-color: #0b5f4f;
  }
  .rp-main .chat-suggestions button { color: #7dd3c7; background: #1b2520; border-color: #61736a; }
  .rp-main .rd-lane-head { color: #ffffff; }
  .rp-main .rp-welcome { color: #b8f0c5; background: #193c28; }
  .rp-main .st-btn-danger,
  .rp-main .hx-del { color: #ffaaa2; background: #351b19; }
  .rp-main .st-tag,
  .rp-main .st-chip,
  .rp-main .st-table,
  .rp-main .st-suggest,
  .rp-main .st-ask,
  .rp-main .st-answer,
  .rp-main .portal-tabs,
  .rp-main .portal-signout,
  .rp-main .hx-card,
  .rp-main .hx-raw pre,
  .rp-main .opspilot-customer-table-report,
  .rp-main .opspilot-customer-table-pagination {
    color: #f2f5f3;
    background: #1b2520;
    border-color: #506158;
  }
  .rp-main .st-out[data-tone=warn] { color: #ffcf70; background: #332811; }
  .rp-main .st-out[data-tone=ok] { color: #b8f0c5; background: #193c28; }
  .rp-main .st-pill[data-tone=warn] { color: #ffcf70; background: #332811; }
  .rp-main .st-pill[data-tone=error] { color: #ffaaa2; background: #351b19; }
  .rp-main .st-pill[data-tone=ok] { color: #b8f0c5; background: #193c28; }

  .status-main .st-chip,
  .status-main .st-tag,
  .status-main .st-table,
  .status-main .st-suggest,
  .status-main .st-ask,
  .status-main .st-answer {
    color: #f2f5f3;
    background: #1b2520;
    border-color: #506158;
  }
  .status-main .st-out[data-tone=ok],
  .status-main .st-ticks { color: #b8f0c5; background: #193c28; }
  .status-main .st-out[data-tone=error] { color: #ffaaa2; background: #351b19; }
  .status-main .st-out[data-tone=warn],
  .status-main .st-tag-warn { color: #ffcf70; background: #332811; }

  .rp-main .m365-scorecard-grade-A,
  .rp-main .hx-grade-a { color: #b8f0c5; background: #193c28; }
}
