:root {
  color-scheme: light;
  --paper: #f6f7f5;
  --white: #fff;
  --ink: #172a39;
  --muted: #64727c;
  --line: #dce3e6;
  --green: #3478a4;
  --green-dark: #0e1a71;
  --mint: #eaf0f2;
  --lavender: #eaf1f8;
  --amber: #f8eed8;
  --blue: #eaf1f5;
  --shadow: 0 16px 48px rgba(23, 42, 57, .08);
  --font-apple: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  font-family: var(--font-apple);
  color: var(--ink);
  background: var(--paper);
}

html body :is(body *, .app-shell *, .lead-drawer *, .lead-dialog *) {
  font-family: var(--font-apple);
}

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline-color: #3478a4;
}
::selection { color: #fff; background: #3478a4; }
.sidebar { background: #fff; border-color: var(--line); box-shadow: 4px 0 24px rgba(23, 42, 57, .035); }
.brand { justify-content: center; width: 100%; min-height: 76px; padding: 5px 2px; }
.brand img { display: block; width: min(100%, 190px); height: auto; }
.workspace-label, .nav-caption, .section-kicker { color: #71818b; }
.workspace-switch, .share-button, .icon-button, .search-box, .filter-button, .table-footer button, .text-button, .copy-button {
  color: #435663;
  border-color: #dce3e6;
  background: #fff;
}
.workspace-avatar { color: #fff; background: #3478a4; }
.nav-item { color: #53636e; }
.nav-item:hover { color: #0e1a71; background: #f2f6f8; }
.nav-item.active { color: #0e1a71; background: #eaf0f2; box-shadow: inset 2px 0 #3478a4; }
.nav-glyph, .active .nav-glyph { color: #3478a4; }
.list-link { color: #435663; }
.dot-blue { background: #3478a4; }
.dot-violet { background: #7184ad; }
.plan-card { border-color: #d8e4ea; background: linear-gradient(145deg, #f8fbfc, #eaf0f2); }
.plan-card b { color: #172a39; }
.plan-card > span:last-child { color: #64727c; }
.plan-orbit { border-color: #cbdce5; box-shadow: 0 0 0 11px rgba(52, 120, 164, .08), 0 0 0 23px rgba(52, 120, 164, .04); }
.user-profile { border-color: var(--line); }
.user-avatar { color: #0e1a71; border-color: #dce3e6; background: #eaf0f2; }
.topbar { border-color: var(--line); }
.breadcrumbs { color: #71818b; }
.breadcrumbs b { color: #172a39; }
.breadcrumbs span { color: #9aa8b0; }
.sample-label { color: #435663; border-color: #dce3e6; background: #fff; }
.sample-label i, .live-dot { background: #3478a4; box-shadow: 0 0 0 3px rgba(52, 120, 164, .12); }
.share-button:hover, .icon-button:hover { color: #0e1a71; border-color: #9bb9ca; background: #f5f8fa; }
.share-button span, .quiet-link span { color: #3478a4; }
.date-line { color: #53636e; }
h1 { color: #172a39; }
h1 em, .workflow-heading h2 em { color: #3478a4; }
.intro-copy > p { color: #64727c; }
.button-dark, .queue-button { color: #fff; background: #0e1a71; box-shadow: 0 6px 16px rgba(14, 26, 113, .16); }
.button-dark:hover, .queue-button:hover:not(:disabled) { color: #fff; background: #09124e; box-shadow: 0 8px 20px rgba(14, 26, 113, .22); }
.button-dark:disabled, .queue-button:disabled { cursor: default; opacity: .7; }
.quiet-link { color: #435663; }
.quiet-link:hover { color: #0e1a71; }
.signal-art { border-color: #d5e0e5; background: radial-gradient(ellipse at 48% 49%, #e8f1f5 0, #f7f9fa 48%, #edf2f4 100%); box-shadow: 0 18px 55px rgba(23, 42, 57, .08), inset 0 0 55px rgba(52, 120, 164, .05); }
.art-glow { background: rgba(52, 120, 164, .13); }
.art-ring { border-color: rgba(52, 120, 164, .2); box-shadow: 0 0 28px rgba(52, 120, 164, .04); }
.art-core { border-color: rgba(52, 120, 164, .26); background: rgba(255, 255, 255, .86); box-shadow: 0 0 38px rgba(52, 120, 164, .1), inset 0 0 24px rgba(52, 120, 164, .035); }
.art-core svg { stroke: #3478a4; }
.art-core span { color: #172a39; }
.art-card { border-color: rgba(52, 120, 164, .2); background: rgba(255, 255, 255, .9); box-shadow: 0 10px 30px rgba(23, 42, 57, .1); }
.art-card b { color: #172a39; }
.art-card small, .art-caption { color: #64727c; }
.art-card > i { color: #3478a4; }
.mini-icon.mint { color: #0e1a71; background: #eaf0f2; }
.mini-icon.lavender { color: #506787; background: #eaf1f8; }
.caption-line { background: #9bb9ca; }
.metric-card { border-color: #dce3e6; background: rgba(255, 255, 255, .92); box-shadow: 0 12px 30px rgba(23, 42, 57, .06); }
.metric-card:hover { border-color: #9bb9ca; box-shadow: var(--shadow); }
.metric-label, .metric-foot { color: #64727c; }
.metric-mark { color: #71818b; }
.metric-mark.green { color: #3478a4; }
.metric-mark.amber { color: #a77a31; }
.metric-value { color: #172a39; }
.foot-dot { background: #3478a4; }
.metric-quote { background: linear-gradient(130deg, #eaf0f2, #f8fbfc); }
.quote-mark { color: #9bb9ca; }
.metric-quote p { color: #172a39; }
.metric-quote em { color: #3478a4; }
.metric-quote > span { color: #64727c; }
.section-top h2, .workflow-heading h2 { color: #172a39; }
.section-top h2 > span { color: #435663; background: #eaf0f2; }
.section-top > div:first-child > p { color: #64727c; }
.search-box:focus-within { border-color: #3478a4; box-shadow: 0 0 0 3px rgba(52, 120, 164, .12); }
.search-box input { color: #172a39; }
.search-box input::placeholder { color: #71818b; }
.search-box kbd { color: #64727c; border-color: #dce3e6; background: #f6f7f5; }
.filter-button:hover, .table-footer button:hover, .copy-button:hover { border-color: #9bb9ca; color: #0e1a71; }
.filter-button b { color: #fff; background: #3478a4; }
.filter-panel { border-color: #dce3e6; background: #fff; box-shadow: 0 12px 30px rgba(23, 42, 57, .08); }
.filter-panel label { color: #53636e; }
.filter-panel select { color: #172a39; border-color: #dce3e6; background: #fff; }
.filter-panel > button { color: #0e1a71; }
.table-wrap { border-color: #dce3e6; background: rgba(255, 255, 255, .96); box-shadow: 0 15px 38px rgba(23, 42, 57, .055); }
thead { background: #f2f5f6; }
th { color: #64727c; border-color: #dce3e6; }
tbody tr + tr td { border-color: #e8edef; }
tbody tr:hover { background: #f7f9fa; }
tbody tr.selected-row { background: #eaf0f2; }
td { color: #435663; }
.person-cell b, .company-cell b { color: #172a39; }
.person-cell small, .company-cell small { color: #71818b; }
.person-avatar { color: #0e1a71; border-color: #dce3e6; background: #eaf0f2; }
.avatar-1 { color: #506787; background: #eaf1f8; }
.avatar-2 { color: #8a6431; background: #f8eed8; }
.avatar-3 { color: #3478a4; background: #eaf0f2; }
.avatar-4 { color: #6c5a85; background: #f0edf5; }
.signal-cell { color: #53636e; }
.signal-indicator { background: #9aa8b0; }
.signal-system-replacement, .signal-new-construction { background: #3478a4; }
.signal-facility-upgrade { background: #7184ad; }
.signal-repair-parts { background: #a77a31; }
.signal-safety-security { background: #0e1a71; }
.score-high { color: #0e1a71; background: #eaf0f2; }
.score-medium { color: #8a6431; background: #f8eed8; }
.score-low { color: #6c5a85; background: #f0edf5; }
.score-pill small { color: #71818b; }
.status-ready { color: #0e1a71; background: #eaf0f2; }
.status-review { color: #8a6431; background: #f8eed8; }
.status-hold { color: #6c5a85; background: #f0edf5; }
.row-more { color: #71818b; }
.row-more:hover { color: #0e1a71; background: #eaf0f2; }
.table-footer { color: #64727c; }
.table-footer b { color: #172a39; }
.table-footer button span { color: #3478a4; }
.empty-state { color: #64727c; }
.empty-state b { color: #172a39; }
.empty-state button { color: #0e1a71; }
.workflow-section { border-color: #dce3e6; background: linear-gradient(120deg, #f8fafb, #eaf0f2); box-shadow: inset 0 1px rgba(255, 255, 255, .8); }
.workflow-steps article { border-color: #dce3e6; background: rgba(255, 255, 255, .88); }
.workflow-steps article:hover { border-color: #9bb9ca; box-shadow: 0 13px 34px rgba(23, 42, 57, .08); }
.step-number, .step-tag { color: #71818b; }
.step-find { color: #0e1a71; background: #eaf0f2; }
.step-score { color: #506787; background: #eaf1f8; }
.step-write { color: #8a6431; background: #f8eed8; }
.workflow-steps h3 { color: #172a39; }
.workflow-steps p, .footer { color: #64727c; }
.footer i { color: #3478a4; }
.drawer-scrim { background: rgba(23, 42, 57, .3); }
.lead-drawer { color: #172a39; background: #fff; border-color: #dce3e6; box-shadow: -20px 0 60px rgba(23, 42, 57, .17); }
.drawer-close, .dialog-close { color: #435663; border-color: #dce3e6; background: #fff; }
.drawer-close:hover, .dialog-close:hover { color: #0e1a71; border-color: #9bb9ca; }
.drawer-banner { background: radial-gradient(circle at 87% 35%, #d7e7ef 0, transparent 38%), linear-gradient(120deg, #f2f6f8, #eaf0f2); }
.drawer-kicker { color: #53636e; }
.drawer-company-avatar { color: #0e1a71; border-color: #fff; background: #eaf0f2; }
.drawer-profile { border-color: #dce3e6; }
.drawer-profile h2 { color: #172a39; }
.drawer-profile p { color: #64727c; }
.drawer-profile p b { color: #172a39; }
.drawer-location { color: #71818b; }
.drawer-score, .drawer-block { border-color: #dce3e6; }
.score-text-high { color: #0e1a71; }
.score-text-medium { color: #8a6431; }
.score-text-low { color: #6c5a85; }
.score-number small, .score-caption { color: #64727c; }
.score-ring { background: conic-gradient(#3478a4 var(--score), #eaf0f2 var(--score)); }
.score-ring span { color: #172a39; background: #fff; }
.ring-medium { background: conic-gradient(#c4985e var(--score), #f8eed8 var(--score)); }
.ring-low { background: conic-gradient(#8b79ae var(--score), #f0edf5 var(--score)); }
.drawer-block-heading h3 { color: #172a39; }
.text-button { color: #0e1a71; border-color: #dce3e6; background: #fff; }
.score-factor { color: #64727c; }
.score-factor.factor-matched { color: #0e1a71; background: #eaf0f2; }
.score-factor[role="button"]:hover { border-color: #9bb9ca; }
.factor-check { color: #71818b; }
.factor-matched .factor-check, .evidence-note span { color: #3478a4; }
.score-factor > b { color: #435663; }
.score-factor > b small, .evidence-note { color: #64727c; }
.signal-source-tag, .draft-tag { color: #435663; border-color: #dce3e6; }
.signal-detail { color: #435663; }
.source-caption { color: #64727c; }
.source-caption a { color: #0e1a71; }
.outreach-text { color: #172a39; border-color: #dce3e6; background: #f8fafb; }
.copy-button { color: #435663; border-color: #dce3e6; background: #fff; }
.no-send-note { color: #64727c; }
.lead-dialog { color: #172a39; border-color: #dce3e6; background: #fff; box-shadow: 0 25px 100px rgba(23, 42, 57, .24); }
.lead-dialog::backdrop { background: rgba(23, 42, 57, .32); }
.dialog-copy { color: #64727c; }
.lead-dialog label { color: #435663; }
.lead-dialog label input, .lead-dialog label select { color: #172a39; border-color: #dce3e6; background: #f8fafb; }
.lead-dialog label input:focus, .lead-dialog label select:focus { border-color: #3478a4; }
.lead-dialog label input::placeholder { color: #71818b; }
.optional { color: #71818b; }
.button-light { color: #435663; border-color: #dce3e6; background: #fff; }
.toast { color: #fff; border-color: #0e1a71; background: #0e1a71; box-shadow: 0 12px 34px rgba(23, 42, 57, .2); }
.danger-button { color: #9c3430; border-color: #e4c6c4; background: #fff; }
.lead-manage-actions { display: flex; justify-content: flex-end; gap: 7px; padding: 10px 0 0; }
.help-dialog { max-width: 460px; }
.help-dialog .dialog-copy { font-size: 12px; }
.lead-dialog { overflow-y: auto; }
.lead-dialog label select { min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 10px; }
.lead-dialog .dialog-actions .button { min-height: 38px; }
.lead-dialog #restore-samples { white-space: normal; }

@media (min-width: 641px) and (max-width: 900px) {
  .sidebar .nav-item:not(.active) { display: flex; }
  .sidebar .nav-item { width: 48px; font-size: 0; }
  .sidebar .nav-glyph { font-size: 18px; }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 4px 8px env(safe-area-inset-bottom, 0px);
    border: 0;
    border-top: 1px solid #dce3e6;
    background: rgba(255, 255, 255, .97);
  }
  .sidebar .brand, .sidebar .workspace-label, .sidebar .workspace-switch,
  .sidebar .nav-caption, .sidebar .sidebar-bottom { display: none; }
  .sidebar .primary-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 4px;
    width: 100%;
    height: 100%;
    margin: 0;
  }
  .sidebar .nav-item, .sidebar .nav-item:not(.active) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
    min-height: 48px;
    margin: 0;
    padding: 3px 1px;
    border-radius: 9px;
    font-size: 9px;
    line-height: 1.15;
    white-space: nowrap;
  }
  .sidebar .nav-item.active { box-shadow: inset 0 2px #3478a4; }
  .sidebar .nav-glyph, .sidebar .active .nav-glyph { font-size: 17px; line-height: 1; }
  .main-content { width: 100%; margin: 0; padding: 0 15px calc(80px + env(safe-area-inset-bottom, 0px)); }
  .topbar { gap: 8px; }
  .top-actions { gap: 7px; }
  .page-intro { min-height: 0; }
  .section-top { width: 100%; }
  .section-actions { min-width: 0; }
  .search-box { min-width: 0; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card, .workflow-section { min-width: 0; }
  .footer { align-items: flex-start; }
}

@media (max-width: 420px) {
  .main-content { padding-right: 12px; padding-left: 12px; }
  .breadcrumbs { font-size: 8px; }
  .breadcrumbs span { margin: 0 5px; }
  .sample-label { display: none; }
  .share-button { gap: 7px; padding: 8px; font-size: 9px; }
  .date-line { flex-wrap: wrap; row-gap: 5px; font-size: 7px; }
  h1 { font-size: clamp(38px, 12vw, 43px); letter-spacing: -2.7px; }
  .intro-actions { flex-wrap: wrap; gap: 12px; }
  .metric-card { padding: 10px; }
  .metric-label { letter-spacing: .45px; }
  .table-footer { align-items: flex-start; gap: 8px; }
  .lead-dialog { padding: 22px 18px; }
  .lead-dialog .dialog-actions { flex-wrap: wrap; }
  .lead-dialog .dialog-actions .button { flex: 1 1 auto; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111820;
  --white: #1b2530;
  --ink: #e5edf3;
  --muted: #9eacb8;
  --line: #303d49;
  --green: #6baed0;
  --green-dark: #4b91b7;
  --mint: #263744;
  --lavender: #303447;
  --amber: #40372b;
  --blue: #293641;
  --shadow: 0 16px 48px rgba(0, 0, 0, .28);
  background: var(--paper);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell { background: var(--paper); }
html[data-theme="dark"] .sidebar { background: #151e27; border-color: var(--line); box-shadow: 4px 0 24px rgba(0, 0, 0, .18); }
html[data-theme="dark"] .workspace-switch,
html[data-theme="dark"] .share-button,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .filter-button,
html[data-theme="dark"] .table-footer button,
html[data-theme="dark"] .text-button,
html[data-theme="dark"] .copy-button,
html[data-theme="dark"] .drawer-close,
html[data-theme="dark"] .dialog-close,
html[data-theme="dark"] .button-light { color: #d3dee6; border-color: var(--line); background: #202b36; }
html[data-theme="dark"] .workspace-switch b,
html[data-theme="dark"] .user-profile b,
html[data-theme="dark"] .plan-card b,
html[data-theme="dark"] .breadcrumbs b,
html[data-theme="dark"] h1,
html[data-theme="dark"] .metric-value,
html[data-theme="dark"] .metric-quote p,
html[data-theme="dark"] .section-top h2,
html[data-theme="dark"] .workflow-heading h2,
html[data-theme="dark"] .person-cell b,
html[data-theme="dark"] .company-cell b,
html[data-theme="dark"] .table-footer b,
html[data-theme="dark"] .empty-state b,
html[data-theme="dark"] .drawer-profile h2,
html[data-theme="dark"] .drawer-profile p b,
html[data-theme="dark"] .drawer-block-heading h3,
html[data-theme="dark"] .workflow-steps h3 { color: #e5edf3; }
html[data-theme="dark"] .workspace-switch small,
html[data-theme="dark"] .user-profile small,
html[data-theme="dark"] .plan-card > span:last-child,
html[data-theme="dark"] .breadcrumbs,
html[data-theme="dark"] .date-line,
html[data-theme="dark"] .intro-copy > p,
html[data-theme="dark"] .metric-label,
html[data-theme="dark"] .metric-foot,
html[data-theme="dark"] .metric-quote > span,
html[data-theme="dark"] .section-top > div:first-child > p,
html[data-theme="dark"] .search-box input::placeholder,
html[data-theme="dark"] .search-box kbd,
html[data-theme="dark"] th,
html[data-theme="dark"] .person-cell small,
html[data-theme="dark"] .company-cell small,
html[data-theme="dark"] .signal-cell,
html[data-theme="dark"] .table-footer,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .workflow-steps p,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .drawer-profile p,
html[data-theme="dark"] .drawer-location,
html[data-theme="dark"] .score-factor,
html[data-theme="dark"] .score-factor > b small,
html[data-theme="dark"] .evidence-note,
html[data-theme="dark"] .source-caption,
html[data-theme="dark"] .no-send-note,
html[data-theme="dark"] .dialog-copy,
html[data-theme="dark"] .optional { color: #a7b5c0; }
html[data-theme="dark"] .workspace-switch:hover,
html[data-theme="dark"] .share-button:hover,
html[data-theme="dark"] .icon-button:hover,
html[data-theme="dark"] .filter-button:hover,
html[data-theme="dark"] .table-footer button:hover,
html[data-theme="dark"] .copy-button:hover { color: #a6d9f1; border-color: #527a91; background: #263744; }
html[data-theme="dark"] .nav-item { color: #b0bec8; }
html[data-theme="dark"] .nav-item:hover { color: #a6d9f1; background: #202d38; }
html[data-theme="dark"] .nav-item.active { color: #a6d9f1; background: #263744; box-shadow: inset 2px 0 #6baed0; }
html[data-theme="dark"] .list-link { color: #c1ccd4; }
html[data-theme="dark"] .plan-card { border-color: #344653; background: linear-gradient(145deg, #202e38, #1a2731); }
html[data-theme="dark"] .plan-orbit { border-color: #3b5868; box-shadow: 0 0 0 11px rgba(107, 174, 208, .08), 0 0 0 23px rgba(107, 174, 208, .04); }
html[data-theme="dark"] .user-avatar,
html[data-theme="dark"] .person-avatar { color: #a6d9f1; border-color: #344653; background: #263744; }
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .user-profile { border-color: var(--line); }
html[data-theme="dark"] .sample-label { color: #c1ccd4; border-color: var(--line); background: #1b2530; }
html[data-theme="dark"] .button-dark,
html[data-theme="dark"] .queue-button { color: #fff; background: #174f71; }
html[data-theme="dark"] .button-dark:hover,
html[data-theme="dark"] .queue-button:hover:not(:disabled) { background: #20688f; }
html[data-theme="dark"] .quiet-link { color: #c1ccd4; }
html[data-theme="dark"] .signal-art { border-color: #344653; background: radial-gradient(ellipse at 48% 49%, #263744 0, #1b2731 48%, #18232c 100%); box-shadow: 0 18px 55px rgba(0, 0, 0, .2), inset 0 0 55px rgba(107, 174, 208, .05); }
html[data-theme="dark"] .art-core,
html[data-theme="dark"] .art-card { border-color: #405563; background: rgba(31, 44, 54, .92); }
html[data-theme="dark"] .art-core span,
html[data-theme="dark"] .art-card b { color: #e5edf3; }
html[data-theme="dark"] .art-card small,
html[data-theme="dark"] .art-caption { color: #a7b5c0; }
html[data-theme="dark"] .metric-card { border-color: var(--line); background: #1b2530; box-shadow: 0 12px 30px rgba(0, 0, 0, .16); }
html[data-theme="dark"] .metric-quote { background: linear-gradient(130deg, #263744, #1b2731); }
html[data-theme="dark"] .section-top h2 > span { color: #c1ccd4; background: #263744; }
html[data-theme="dark"] .search-box input { color: #e5edf3; }
html[data-theme="dark"] .search-box kbd { border-color: #344653; background: #18232c; }
html[data-theme="dark"] .filter-panel,
html[data-theme="dark"] .filter-panel select { color: #d3dee6; border-color: var(--line); background: #1b2530; }
html[data-theme="dark"] .filter-panel label { color: #b0bec8; }
html[data-theme="dark"] .filter-panel > button,
html[data-theme="dark"] .empty-state button,
html[data-theme="dark"] .source-caption a { color: #a6d9f1; }
html[data-theme="dark"] .table-wrap { border-color: var(--line); background: #1b2530; }
html[data-theme="dark"] thead { background: #202b36; }
html[data-theme="dark"] th,
html[data-theme="dark"] tbody tr + tr td { border-color: #303d49; }
html[data-theme="dark"] tbody tr:hover { background: #202d38; }
html[data-theme="dark"] tbody tr.selected-row { background: #263744; }
html[data-theme="dark"] td { color: #c1ccd4; }
html[data-theme="dark"] .avatar-1 { color: #b6c8ec; background: #303447; }
html[data-theme="dark"] .avatar-2 { color: #e2bd82; background: #40372b; }
html[data-theme="dark"] .avatar-4 { color: #d0c0e8; background: #353044; }
html[data-theme="dark"] .score-high,
html[data-theme="dark"] .status-ready { color: #a6d9f1; background: #263744; }
html[data-theme="dark"] .score-medium,
html[data-theme="dark"] .status-review { color: #e2bd82; background: #40372b; }
html[data-theme="dark"] .score-low,
html[data-theme="dark"] .status-hold { color: #d0c0e8; background: #353044; }
html[data-theme="dark"] .workflow-section { border-color: var(--line); background: linear-gradient(120deg, #1b2731, #263744); box-shadow: inset 0 1px rgba(255, 255, 255, .025); }
html[data-theme="dark"] .workflow-steps article { border-color: var(--line); background: rgba(27, 37, 48, .9); }
html[data-theme="dark"] .workflow-steps article:hover { border-color: #527a91; }
html[data-theme="dark"] .step-find,
html[data-theme="dark"] .score-factor.factor-matched { color: #a6d9f1; background: #263744; }
html[data-theme="dark"] .step-score { color: #b6c8ec; background: #303447; }
html[data-theme="dark"] .step-write { color: #e2bd82; background: #40372b; }
html[data-theme="dark"] .lead-drawer,
html[data-theme="dark"] .lead-dialog { color: #e5edf3; border-color: var(--line); background: #1b2530; }
html[data-theme="dark"] .drawer-banner { background: radial-gradient(circle at 87% 35%, #304957 0, transparent 38%), linear-gradient(120deg, #202e38, #263744); }
html[data-theme="dark"] .drawer-company-avatar,
html[data-theme="dark"] .score-factor.factor-matched { border-color: #344653; }
html[data-theme="dark"] .drawer-profile,
html[data-theme="dark"] .drawer-score,
html[data-theme="dark"] .drawer-block { border-color: var(--line); }
html[data-theme="dark"] .score-ring { background: conic-gradient(#6baed0 var(--score), #344653 var(--score)); }
html[data-theme="dark"] .score-ring span { color: #e5edf3; background: #1b2530; }
html[data-theme="dark"] .ring-medium { background: conic-gradient(#c4985e var(--score), #40372b var(--score)); }
html[data-theme="dark"] .ring-low { background: conic-gradient(#a18bc6 var(--score), #353044 var(--score)); }
html[data-theme="dark"] .score-factor > b,
html[data-theme="dark"] .signal-detail,
html[data-theme="dark"] .signal-source-tag,
html[data-theme="dark"] .draft-tag { color: #c1ccd4; }
html[data-theme="dark"] .signal-source-tag,
html[data-theme="dark"] .draft-tag { border-color: var(--line); }
html[data-theme="dark"] .outreach-text,
html[data-theme="dark"] .lead-dialog label input,
html[data-theme="dark"] .lead-dialog label select { color: #e5edf3; border-color: var(--line); background: #151e27; }
html[data-theme="dark"] .lead-dialog label { color: #c1ccd4; }
html[data-theme="dark"] .lead-dialog label input::placeholder { color: #8495a2; }
html[data-theme="dark"] .danger-button { color: #f0aaa5; border-color: #714441; background: #2a252b; }
html[data-theme="dark"] .toast { color: #fff; border-color: #174f71; background: #174f71; }
html[data-theme="dark"] .lead-dialog::backdrop { background: rgba(0, 0, 0, .58); }

@media (max-width: 640px) {
  html[data-theme="dark"] .sidebar { border-color: var(--line); background: rgba(21, 30, 39, .97); }
  html[data-theme="dark"] .sidebar .nav-item.active { box-shadow: inset 0 2px #6baed0; }
}

@media (max-width: 640px) {
  .theme-toggle { display: grid; }
}
