:root {
  color-scheme: dark;
  --bg: #07100f;
  --surface: #0b1514;
  --surface-2: #101c1a;
  --line: #20302d;
  --line-soft: #172522;
  --text: #edf4f1;
  --muted: #879a95;
  --muted-2: #5f7470;
  --accent: #72e2b4;
  --accent-2: #c3f75f;
  --warning: #f3c969;
  --danger: #ff8d83;
  --info: #75b7ff;
  --rail: 64px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shell { min-height: 100svh; }
.rail { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 18px 0; border-right: 1px solid var(--line); background: #081210; }
.brand-mark { width: 38px; height: 38px; border: 1px solid #355148; background: #10211d; color: var(--accent); font: 600 14px ui-monospace, "SFMono-Regular", Consolas, monospace; cursor: pointer; }
.brand-mark span { color: var(--text); }
.rail-nav { display: flex; flex: 1; flex-direction: column; gap: 10px; padding-top: 42px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: color .18s, background .18s, transform .18s; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--text); background: #14211f; transform: translateY(-1px); }
.icon-btn.active { color: var(--accent); background: #13251f; box-shadow: inset 2px 0 var(--accent); }
.icon-btn.subtle { border: 1px solid var(--line); }
main { margin-left: var(--rail); min-width: 0; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 26px; border-bottom: 1px solid var(--line); background: rgba(7,16,15,.93); position: sticky; top: 0; z-index: 15; backdrop-filter: blur(14px); }
.product-name { margin-bottom: 6px; color: var(--text); font: 500 11px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 0; }
.product-name span { margin-left: 8px; color: var(--accent); }
.prospect-line { display: flex; align-items: center; gap: 12px; }
.prospect-line strong { font-size: 18px; }
.prospect-line span { padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.header-controls { display: flex; align-items: center; gap: 14px; }
.mode-switch, .segmented { display: flex; padding: 3px; background: #0d1917; border: 1px solid var(--line); }
.mode-switch button, .segmented button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 500 9px ui-monospace, "SFMono-Regular", Consolas, monospace; padding: 7px 9px; letter-spacing: 0; }
.mode-switch button.selected, .segmented button.selected { color: var(--accent); background: #183027; }
.freshness { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.freshness b { display: block; color: var(--text); font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(114,226,180,.11); }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #7ae5ba; background: var(--accent); color: #07100f; font-weight: 700; padding: 11px 15px; cursor: pointer; transition: background .18s, transform .18s; }
.primary:hover { background: #9bf1ce; transform: translateY(-1px); }
.primary svg { width: 16px; height: 16px; }
.primary.compact { padding: 9px 12px; font-size: 11px; }
.primary.full { width: 100%; }
.sample-banner { min-height: 33px; display: flex; align-items: center; gap: 8px; padding: 7px 26px; border-bottom: 1px solid #244139; color: var(--muted); background: #0b1a16; font-size: 10px; }
.sample-banner svg { width: 14px; color: var(--accent); }
.sample-banner span { color: var(--accent); font-weight: 700; text-transform: uppercase; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.metrics article { min-height: 92px; padding: 16px 22px; border-right: 1px solid var(--line); background: #091210; }
.metrics article:last-child { border-right: 0; }
.metrics span, .identity-strip span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.metrics strong { display: inline-block; margin: 3px 8px 0 0; font: 500 28px ui-monospace, "SFMono-Regular", Consolas, monospace; }
.metrics small { color: var(--muted-2); font-size: 9px; }
.workspace-grid { display: grid; grid-template-columns: minmax(260px, 1.05fr) minmax(500px, 2fr) minmax(280px, .92fr); min-height: 660px; border-bottom: 1px solid var(--line); }
.pane { min-width: 0; border-right: 1px solid var(--line); }
.activity-pane { background: #08110f; }
.section-head, .selected-heading, .journey-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-head { padding: 20px 18px 14px; }
.section-head.tight { padding: 0 0 14px; }
.eyebrow { display: block; margin-bottom: 5px; color: var(--accent); font: 500 8px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 0; }
h1, h2, p { margin: 0; }
h1 { font-size: 18px; letter-spacing: 0; }
h2 { font-size: 15px; letter-spacing: 0; }
.activity-labels { display: grid; grid-template-columns: 1.2fr 1fr 40px; padding: 0 18px 8px; color: var(--muted-2); font: 500 8px ui-monospace, "SFMono-Regular", Consolas, monospace; }
.activity-item { width: 100%; display: grid; grid-template-columns: 1.2fr 1fr 40px; align-items: center; min-height: 74px; padding: 12px 18px; border: 0; border-top: 1px solid var(--line-soft); background: transparent; text-align: left; cursor: pointer; transition: background .18s, box-shadow .18s; }
.activity-item:hover { background: #0d1917; }
.activity-item.selected { background: #12231e; box-shadow: inset 2px 0 var(--accent); }
.account-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini-avatar, .company-avatar { display: grid; place-items: center; flex: 0 0 auto; background: #183128; color: var(--accent); font: 600 10px ui-monospace, "SFMono-Regular", Consolas, monospace; }
.mini-avatar { width: 30px; height: 30px; }
.company-avatar { width: 42px; height: 42px; font-size: 12px; }
.account-cell strong, .signal-cell strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.account-cell span, .signal-cell span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signal-cell strong { color: #cdd9d5; font-weight: 500; }
.recency { color: var(--muted); font: 500 9px ui-monospace, "SFMono-Regular", Consolas, monospace; text-align: right; }
.intelligence-pane { padding: 20px 22px; background: var(--surface); }
.selected-heading { padding-bottom: 17px; }
.selected-heading > div:nth-child(2) { flex: 1; min-width: 0; }
.selected-heading h2 { font-size: 21px; }
.selected-heading p { margin-top: 4px; color: var(--muted); font-size: 10px; }
.identity-strip { display: grid; grid-template-columns: .75fr 1.25fr 1fr; padding: 13px 0; border-block: 1px solid var(--line); }
.identity-strip > div { padding: 0 14px; border-right: 1px solid var(--line); }
.identity-strip > div:first-child { padding-left: 0; }
.identity-strip > div:last-child { border-right: 0; }
.identity-strip strong { display: block; margin-top: 5px; font: 500 11px ui-monospace, "SFMono-Regular", Consolas, monospace; }
.accent-text { color: var(--accent); }
.topic-row { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 0 22px; }
.chip { padding: 5px 8px; border: 1px solid var(--line); color: #aebfba; background: #0d1917; font-size: 9px; }
.journey-head { padding: 0 0 12px; }
.journey { position: relative; }
.journey::before { content: ""; position: absolute; left: 10px; top: 8px; bottom: 14px; width: 1px; background: var(--line); }
.journey-event { position: relative; display: grid; grid-template-columns: 20px 74px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; animation: reveal .25s ease both; }
.journey-dot { z-index: 1; width: 8px; height: 8px; margin: 4px 0 0 6px; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 4px var(--surface); }
.journey-event.high .journey-dot, .journey-event.identity .journey-dot { background: var(--accent); }
.event-time { color: var(--muted); font: 500 9px ui-monospace, "SFMono-Regular", Consolas, monospace; line-height: 1.5; }
.event-copy strong { display: block; font-size: 11px; font-weight: 600; }
.event-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.evidence-status { padding: 4px 6px; border: 1px solid var(--line); color: var(--muted); font: 500 7px ui-monospace, "SFMono-Regular", Consolas, monospace; text-transform: uppercase; }
.evidence-status.verified { color: var(--accent); border-color: #2f5b4b; }
.evidence-status.partial { color: var(--warning); border-color: #5d5031; }
.evidence-status.conflict { color: var(--danger); border-color: #61413d; }
.decision-pane { min-width: 0; background: #091310; }
.score-module, .action-module { padding: 20px; border-bottom: 1px solid var(--line); }
.text-btn { padding: 0; border: 0; color: var(--accent); background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.score-visual { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.score-ring { width: 82px; height: 82px; display: grid; place-content: center; text-align: center; border-radius: 50%; background: radial-gradient(circle at center, #0d1917 56%, transparent 58%), conic-gradient(var(--accent) 0 86%, #1e302c 86%); }
.score-ring strong { font: 500 25px ui-monospace, "SFMono-Regular", Consolas, monospace; }
.score-ring span { color: var(--muted); font: 400 8px ui-monospace, "SFMono-Regular", Consolas, monospace; }
.score-visual > div:last-child strong, .score-visual > div:last-child span { display: block; }
.score-visual > div:last-child strong { font-size: 13px; }
.score-visual > div:last-child span { margin-top: 5px; color: var(--accent); font-size: 9px; }
.bar-row { display: grid; grid-template-columns: 1fr 64px 24px; align-items: center; gap: 8px; margin: 9px 0; color: var(--muted); font-size: 9px; }
.bar-track { height: 3px; background: #1b2b28; }
.bar-fill { height: 100%; background: var(--accent); }
.bar-row b { color: var(--text); font: 500 9px ui-monospace, "SFMono-Regular", Consolas, monospace; text-align: right; }
.confidence-line { display: flex; justify-content: space-between; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.confidence-line strong { color: var(--text); }
.action-module h2 { margin: 5px 0 7px; font-size: 17px; }
.action-module > p { color: var(--muted); font-size: 10px; line-height: 1.55; }
.action-module dl { display: grid; grid-template-columns: 68px 1fr; gap: 8px; margin: 16px 0; font-size: 9px; }
.action-module dt { color: var(--muted); }
.action-module dd { margin: 0; color: #c8d3d0; }
.verification-note { display: flex; gap: 9px; margin: 14px 0; padding: 10px; background: #111d1a; border-left: 2px solid var(--warning); color: var(--muted); font-size: 8px; line-height: 1.45; }
.verification-note svg { width: 15px; flex: 0 0 auto; color: var(--warning); }
.verification-note b { display: block; color: var(--warning); }
.evidence-workspace { background: #08110f; min-height: 330px; }
.tabs { display: flex; gap: 3px; overflow-x: auto; padding: 0 22px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs button { flex: 0 0 auto; min-height: 48px; padding: 0 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.tabs button.selected { color: var(--text); border-bottom-color: var(--accent); }
.tabs span { margin-left: 5px; color: var(--accent); }
.tab-content { padding: 22px; animation: reveal .3s ease; }
.committee-grid { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); }
.person { min-height: 158px; padding: 15px; border-right: 1px solid var(--line); background: var(--surface); }
.person:last-child { border-right: 0; }
.person-role { color: var(--muted); font: 500 8px ui-monospace, "SFMono-Regular", Consolas, monospace; text-transform: uppercase; }
.person strong { display: block; margin-top: 12px; font-size: 12px; }
.person p { min-height: 31px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.state-label { display: inline-block; margin-top: 15px; padding: 4px 6px; border: 1px solid var(--line); color: var(--muted); font: 500 7px ui-monospace, "SFMono-Regular", Consolas, monospace; text-transform: uppercase; }
.state-label.verified { color: var(--accent); }.state-label.probable { color: var(--warning); }.state-label.conflicting { color: var(--danger); }
.progression { display: grid; grid-template-columns: repeat(8, 1fr); overflow-x: auto; }
.progress-step { position: relative; min-width: 118px; padding: 14px 12px; border-top: 2px solid var(--line); }
.progress-step::before { content: ""; position: absolute; top: -5px; left: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.progress-step.complete { border-color: var(--accent); }.progress-step.complete::before { background: var(--accent); }
.progress-step.current { border-color: var(--warning); }.progress-step.current::before { background: var(--warning); }
.progress-step strong { display: block; font-size: 10px; }.progress-step span { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.blindspot-list { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.blindspot { padding: 16px; border-right: 1px solid var(--line); }.blindspot:last-child { border-right: 0; }
.blindspot svg { width: 18px; color: var(--warning); }.blindspot strong { display: block; margin: 14px 0 5px; font-size: 11px; }.blindspot p { color: var(--muted); font-size: 9px; line-height: 1.5; }
.scenario-layout, .pilot-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
label { color: var(--muted); font-size: 9px; }
input, select { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 0; background: #0c1816; color: var(--text); }
.scenario-output, .pilot-summary { padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.scenario-output .big { display: block; margin: 10px 0 4px; font: 500 27px ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--accent); }
.scenario-output p, .pilot-summary p { color: var(--muted); font-size: 9px; line-height: 1.55; }
.disclaimer { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--warning) !important; }
.pilot-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 22px; }
.pilot-field span { color: var(--muted); font-size: 8px; text-transform: uppercase; }.pilot-field strong { display: block; margin-top: 4px; font-size: 10px; }
.state-view { min-height: 210px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--line); }
.state-view svg { width: 30px; height: 30px; margin-bottom: 12px; color: var(--muted); }
.state-view h3 { margin: 0 0 6px; font-size: 14px; }.state-view p { max-width: 360px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.skeleton { width: min(520px, 80%); }.skeleton span { display: block; height: 10px; margin: 10px 0; background: linear-gradient(90deg, #12201d, #1d302b, #12201d); background-size: 200% 100%; animation: shimmer 1.2s infinite; }.skeleton span:nth-child(2){ width:76%; }.skeleton span:nth-child(3){ width:45%; }
.modal { width: min(680px, calc(100% - 30px)); max-height: 88svh; padding: 0; border: 1px solid #2d4540; background: #0b1514; color: var(--text); box-shadow: 0 28px 90px rgba(0,0,0,.5); }
.modal::backdrop { background: rgba(2,7,6,.72); backdrop-filter: blur(4px); }
.modal-head { display: flex; justify-content: space-between; align-items: start; padding: 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; max-height: 66svh; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.secondary { border: 1px solid var(--line); background: transparent; color: var(--text); padding: 10px 13px; cursor: pointer; }
.call-step { display: grid; grid-template-columns: 58px 1fr 22px; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.call-step time { color: var(--accent); font: 500 9px ui-monospace, "SFMono-Regular", Consolas, monospace; }.call-step strong { display: block; font-size: 11px; }.call-step p { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }.call-step svg { width: 15px; color: var(--muted); }
.state-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }.state-options button { padding: 13px; border: 1px solid var(--line); background: #0d1917; text-align: left; cursor: pointer; }.state-options button:hover { border-color: var(--accent); }.state-options strong { display: block; font-size: 10px; }.state-options span { color: var(--muted); font-size: 8px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 60; max-width: 360px; padding: 13px 16px; background: var(--text); color: #07100f; font-size: 10px; font-weight: 700; opacity: 0; transform: translateY(15px); pointer-events: none; transition: opacity .2s, transform .2s; }.toast.show { opacity: 1; transform: translateY(0); }
.mobile-nav { display: none; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1180px) {
  .workspace-grid { grid-template-columns: 280px minmax(440px, 1fr); }
  .decision-pane { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
  .score-module { border-right: 1px solid var(--line); }
  .action-module, .score-module { border-bottom: 0; }
  .header-controls .freshness { display: none; }
}

@media (max-width: 820px) {
  :root { --rail: 0px; }
  .rail { display: none; }
  main { margin: 0; padding-bottom: 66px; }
  .topbar { min-height: 70px; padding: 12px 15px; }
  .prospect-line span, .mode-switch, .primary.compact { display: none; }
  .prospect-line strong { font-size: 15px; }
  .sample-banner { padding: 7px 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics article { min-height: 78px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
  .metrics strong { font-size: 22px; }
  .workspace-grid { display: block; min-height: 0; }
  .pane { border-right: 0; }
  .activity-pane { border-bottom: 1px solid var(--line); }
  .activity-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 15px 14px; gap: 8px; }
  .activity-labels { display: none; }
  .activity-item { flex: 0 0 260px; grid-template-columns: 1.2fr 1fr 32px; min-height: 70px; padding: 10px; border: 1px solid var(--line); scroll-snap-align: start; }
  .activity-item.selected { box-shadow: inset 0 2px var(--accent); }
  .intelligence-pane { padding: 18px 15px; }
  .selected-heading h2 { font-size: 19px; }
  .identity-strip { grid-template-columns: .7fr 1.3fr; }
  .identity-strip > div:nth-child(3) { grid-column: 1 / -1; margin-top: 12px; padding: 12px 0 0; border-top: 1px solid var(--line); border-right: 0; }
  .journey-head { align-items: end; }
  .segmented button { padding: 7px; font-size: 8px; }
  .journey-event { grid-template-columns: 20px 62px 1fr; }
  .evidence-status { grid-column: 3; width: max-content; }
  .decision-pane { display: block; }
  .score-module { border-right: 0; border-bottom: 1px solid var(--line); }
  .tabs { padding: 0 12px; }
  .tab-content { padding: 15px; }
  .committee-grid, .blindspot-list { grid-template-columns: 1fr; border: 0; gap: 8px; }
  .person, .blindspot { min-height: auto; border: 1px solid var(--line); }
  .scenario-layout, .pilot-layout { grid-template-columns: 1fr; }
  .form-grid, .pilot-fields { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 30; height: 62px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(8,18,16,.97); backdrop-filter: blur(14px); }
  .mobile-nav button { display: grid; place-content: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font-size: 8px; cursor: pointer; }
  .mobile-nav button.active { color: var(--accent); }.mobile-nav svg { width: 17px; margin: auto; }
  .toast { right: 15px; left: 15px; bottom: 76px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.source-health{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.source-health .chip.ok{color:var(--accent)}.source-health .chip.partial{color:var(--warning)}.source-health .chip.error{color:var(--danger)}
