:root{
  --bg:#F7F4EC; --panel:#FFFFFF; --ink:#1E3050; --sub:#6B7484; --line:#E4DFD2;
  --navy:#1E3050; --oncream:#FAF8F3; --accent:#E8761F; --accent-ink:#FFFFFF;
  --ok:#3D7A4F; --soft:#EFEAE0;
  color-scheme:light dark;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#121721; --panel:#1B212D; --ink:#E8EBF1; --sub:#98A1B1; --line:#2A3140;
    --navy:#232E47; --oncream:#EDF0F6; --accent:#F0853A; --accent-ink:#1A1208; --ok:#7FC291; --soft:#222A38;
  }
}
:root[data-theme="dark"]{
  --bg:#121721; --panel:#1B212D; --ink:#E8EBF1; --sub:#98A1B1; --line:#2A3140;
  --navy:#232E47; --oncream:#EDF0F6; --accent:#F0853A; --accent-ink:#1A1208; --ok:#7FC291; --soft:#222A38;
}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
html,body{height:100%}
*,*::before,*::after{box-sizing:inherit}
body{margin:0; background:var(--bg); color:var(--ink);
  font-family:system-ui,-apple-system,sans-serif; font-size:16px; line-height:1.45;
  -webkit-font-smoothing:antialiased}
.wrap{max-width:680px; margin:0 auto; padding:0 16px 56px}
header.band{max-width:680px; margin:0 auto; padding:18px 16px 12px; display:flex; align-items:center; justify-content:space-between; gap:12px}
header.band h1{font-size:20px; font-weight:650; letter-spacing:-.01em; margin:0}
header.band h1 small{display:block; font-size:12.5px; font-weight:500; color:var(--sub); letter-spacing:.02em}
button{font:inherit}
button.cta{border:none; border-radius:999px; padding:11px 18px; font-weight:650; font-size:15px;
  background:var(--accent); color:var(--accent-ink); cursor:pointer; box-shadow:0 1px 0 rgba(30,48,80,.15)}
button.primary{border:none; border-radius:10px; padding:10px 16px; font-weight:600; background:var(--ink); color:var(--bg); cursor:pointer}
button.quiet{border:1px solid var(--line); border-radius:10px; padding:10px 14px; background:none; color:var(--sub); cursor:pointer}
button.mini{border:1px solid var(--line); border-radius:999px; padding:4px 12px; background:none; color:var(--sub); cursor:pointer; font-size:13px}
button:disabled{opacity:.45; cursor:default}
button:focus-visible,textarea:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent); outline-offset:2px}

/* stat tiles */
.statrow{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:16px}
.stat{background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:12px 12px 10px}
.stat .n{font-size:26px; font-weight:650; letter-spacing:-.02em; font-variant-numeric:tabular-nums; line-height:1.1}
.stat .n.alert{color:var(--accent)}
.stat .l{font-size:12.5px; color:var(--sub); margin-top:2px}

/* sections */
h2.sec{font-size:13.5px; font-weight:600; color:var(--sub); margin:4px 0 10px; letter-spacing:.01em}
.panelcard{background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:14px 16px; margin-bottom:16px}
.pchead{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px}
.pchead h2{font-size:13.5px; font-weight:600; color:var(--sub); margin:0; letter-spacing:.01em}

/* next steps queue */
section.queue{margin-bottom:16px}
.card{background:var(--panel); border:1px solid var(--line); border-radius:14px;
  padding:12px 14px; margin-bottom:10px; cursor:pointer; width:100%; text-align:left; font:inherit; color:inherit}
.card .top{display:flex; justify-content:space-between; gap:10px; align-items:baseline}
.card .who{font-weight:650; font-size:16px}
.card .due{flex:none; font-size:13px; color:var(--sub); white-space:nowrap; font-variant-numeric:tabular-nums}
.card.overdue{border-left:4px solid var(--accent); padding-left:11px}
.card.overdue .due{color:var(--accent); font-weight:600}
.card .act{font-size:14.5px; margin-top:3px}
.card .act .k{color:var(--sub)}
.chip{display:inline-block; font-size:12px; color:var(--sub); border:1px solid var(--line); border-radius:999px; padding:1px 8px; margin-top:7px; margin-right:6px}
.empty{color:var(--sub); font-size:14.5px; background:var(--soft); border-radius:12px; padding:16px}

/* pipeline board */
.stageblock{margin-bottom:12px}
.stageblock:last-child{margin-bottom:0}
.stagehead{display:flex; justify-content:space-between; align-items:baseline; padding:2px 0 6px; border-bottom:1px solid var(--line); margin-bottom:2px}
.stagehead .sn{font-size:13.5px; font-weight:650}
.stagehead .sc{font-size:12.5px; color:var(--sub); font-variant-numeric:tabular-nums}
.prow{display:flex; justify-content:space-between; gap:10px; align-items:baseline; width:100%;
  border:none; background:none; text-align:left; font:inherit; color:inherit; cursor:pointer; padding:8px 2px; border-bottom:1px dashed var(--line)}
.prow:last-child{border-bottom:none}
.prow .pn{font-size:15px; font-weight:500}
.prow .pd{flex:none; font-size:12.5px; color:var(--sub); white-space:nowrap; max-width:52%; overflow:hidden; text-overflow:ellipsis}
.prow.passed .pn{color:var(--sub); text-decoration:line-through}
.addform{margin-top:10px; border-top:1px dashed var(--line); padding-top:12px}

/* raise (compact) */
.raise{background:var(--navy); color:var(--oncream); border-radius:14px; padding:14px 16px; margin-bottom:16px}
.raise .rrow{margin-bottom:12px}
.raise .rrow:last-child{margin-bottom:0}
.raise .rlabel{display:flex; justify-content:space-between; align-items:baseline; gap:10px}
.raise .rname{font-size:13px; letter-spacing:.02em; opacity:.85}
.raise .rnum{font-size:15px; font-weight:650; font-variant-numeric:tabular-nums; opacity:.95}
.raise .bar{height:7px; border-radius:999px; background:rgba(250,248,243,.18); margin-top:6px; overflow:hidden; display:flex}
.raise .fill{background:var(--accent); height:100%}
.raise .circ{background:var(--accent); opacity:.42; height:100%}

/* sheets */
.sheet{position:fixed; inset:0; background:var(--bg); overflow-y:auto; display:none; z-index:20;
  padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px)}
.sheet.open{display:block}
.sheethead{display:flex; align-items:center; gap:10px; margin:14px 0 6px}
.sheethead button.back{border:none; background:none; color:var(--ink); font-size:15px; cursor:pointer; padding:6px 8px 6px 0}
.sheethead h2{margin:0; font-size:19px; font-weight:650}

/* capture */
.microw{display:flex; gap:14px; align-items:center; margin-top:8px}
button.rec{flex:none; width:68px; height:68px; border-radius:50%; border:none; background:var(--accent); color:var(--accent-ink);
  display:flex; align-items:center; justify-content:center; cursor:pointer}
button.rec svg{width:28px; height:28px}
button.rec.listening{animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}
@media (prefers-reduced-motion:reduce){button.rec.listening{animation:none; outline:3px solid var(--accent); outline-offset:3px}}
.microw .hint{color:var(--sub); font-size:14px}
textarea#note{width:100%; min-height:130px; margin-top:14px; resize:vertical;
  border:1px solid var(--line); border-radius:12px; padding:10px 12px; background:var(--panel); color:var(--ink); font:inherit; font-size:15px}
.partial{min-height:18px; margin-top:6px; color:var(--sub); font-size:13px; font-style:italic}
.caprow{display:flex; gap:10px; margin-top:12px}
.err{color:var(--accent); font-size:13.5px; margin-top:8px}
.confirm{margin-top:16px; border-top:1px dashed var(--line); padding-top:16px}
.confirm h2{font-size:15px; font-weight:650; margin:0 0 10px}
.fgrid{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.fgrid .full{grid-column:1/-1}
.field label{display:block; font-size:12.5px; color:var(--sub); margin-bottom:3px}
.field input,.field textarea,.field select{width:100%; border:1px solid var(--line); border-radius:8px; padding:8px 10px;
  background:var(--panel); color:var(--ink); font:inherit; font-size:14.5px}
.panelcard .field input,.panelcard .field select{background:var(--bg)}
.field textarea{min-height:56px; resize:vertical}
.reqnote{color:var(--accent); font-size:13.5px; margin-top:8px}
.listprev{font-size:13.5px; color:var(--sub); margin:8px 0 0}
.listprev b{color:var(--ink); font-weight:600}

/* detail */
.detsub{color:var(--sub); font-size:14px; margin:0 0 14px}
.profile{background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:12px 14px; margin-bottom:14px}
.profile h3{margin:0 0 10px; font-size:15px; font-weight:650}
.briefbtn{margin-bottom:14px}
.brief{background:var(--soft); border-radius:12px; padding:14px; font-size:14.5px; white-space:pre-wrap; margin-bottom:16px}
.entry{background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:12px 14px; margin-bottom:10px}
.entry .edate{font-size:13px; color:var(--sub)}
.entry .chips{margin-top:6px; font-size:14px}
.entry .chips p{margin:4px 0}
.entry .chips .k{color:var(--sub)}
.entry .chips .yes{color:var(--ok)}
.entry .chips .no{color:var(--accent)}
.entry details{margin-top:8px}
.entry summary{font-size:13px; color:var(--sub); cursor:pointer}
.entry .raw{font-size:14px; margin-top:6px; white-space:pre-wrap}
.entry .rowend{display:flex; justify-content:flex-end; margin-top:6px}
.entry .del{border:none; background:none; color:var(--sub); font-size:12.5px; cursor:pointer; text-decoration:underline}

.toast{position:fixed; left:50%; transform:translateX(-50%); bottom:calc(24px + env(safe-area-inset-bottom,0px));
  background:var(--ink); color:var(--bg); padding:10px 16px; border-radius:10px; font-size:14px; opacity:0; transition:opacity .2s; pointer-events:none; z-index:40}
.toast.show{opacity:1}

[hidden]{display:none!important}
#cap{z-index:21}
.storagebar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:16px}
.storagebar .status{font-size:13px;color:var(--sub);flex:1;min-width:150px}
.storagebar .status.warn{color:var(--accent);font-weight:600}
.fgrid .field{min-width:0}
.field .help{font-size:12px;color:var(--sub);margin-top:4px}
button.danger{color:#b64a29}
@media(max-width:420px){.fgrid{grid-template-columns:1fr}.stat .n{font-size:22px}.stat .l{font-size:11px}.stat{padding:10px 8px}.caprow{flex-wrap:wrap}.card .top{flex-wrap:wrap}.prow .pd{max-width:40%}}
/* V3 additions */
.wrap,header.band{max-width:1000px}.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:14px}.toolbar .status{flex:1;min-width:180px;color:var(--sub);font-size:12px}.tagrow{display:flex;gap:5px;flex-wrap:wrap}.tag{font-size:12px;border:1px solid var(--line);padding:2px 8px;border-radius:999px;color:var(--sub)}.tag.warn{color:var(--accent);font-weight:600}.roundgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.roundpanel{padding:12px;border:1px solid var(--line);border-radius:12px;min-width:0}.roundpanel h3{margin:0 0 10px}.metrics{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;font-size:13px;margin-top:10px}.metrics span{display:block;font-size:11px;color:inherit;opacity:.8}.metrics b{font-size:16px}.filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px}.filters .full{grid-column:1/-1}.small{font-size:12.5px;color:var(--sub)}.subline{font-size:13px;color:var(--sub);margin-top:4px}.boardrow{display:block;text-align:left;width:100%;border:none;border-bottom:1px solid var(--line);background:none;color:inherit;padding:10px 2px;cursor:pointer}.boardrow:last-child{border-bottom:none}.boardrow .name{font-weight:650}.boardrow .top{display:flex;justify-content:space-between;gap:10px;align-items:baseline}.score{font-size:13px;color:var(--ok)}.sectiontitle{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}.sectiontitle h3{margin:0}.itemcard{border:1px solid var(--line);border-radius:10px;padding:10px;margin:8px 0;background:var(--bg)}.itemcard .field input,.itemcard .field textarea,.itemcard .field select{background:var(--panel)}.itemhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.itemhead .small{font-weight:600}.stickybar{position:sticky;top:0;z-index:2;background:var(--bg);padding:10px 0;display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:12px}.stickybar h2{margin:0;flex:1;font-size:18px}.stickybar .back{border:0;background:none;color:var(--ink);padding:4px;cursor:pointer}.wideinput{width:100%;min-height:120px;border:1px solid var(--line);border-radius:10px;padding:10px;color:var(--ink);background:var(--panel);font:inherit;resize:vertical}.sheet.aux{z-index:22}.report{min-height:360px;font-family:monospace;font-size:13px}.preview{max-height:240px;overflow:auto;white-space:pre-wrap;font-size:13px;border:1px solid var(--line);padding:10px;border-radius:8px}.checkline{display:flex;align-items:center;gap:8px;font-size:14px}.checkline input{width:auto}.mutedline{color:var(--sub);font-size:13px;margin:5px 0}.dangertext{color:var(--accent)}.hidden{display:none}.progressline{font-size:12px;margin-top:6px;opacity:.9}.sheet .wrap{padding-bottom:60px}.field input[type=number]{min-width:0}.field label{font-weight:500}.roundpanel .fgrid{gap:8px}.rowbuttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.separator{height:1px;background:var(--line);margin:12px 0}.raise .rrow{margin-bottom:14px}.raise .roundpanel{border-color:rgba(250,248,243,.2)}.pillbtn{font-size:12px;color:var(--sub)}.filterstatus{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.card .act{overflow-wrap:anywhere}.small a{color:var(--ink)}
@media(max-width:680px){.roundgrid{grid-template-columns:1fr}.filters{grid-template-columns:1fr 1fr}.stickybar h2{font-size:16px}.boardrow .top{flex-wrap:wrap}.toolbar .status{width:100%;flex-basis:100%}}
/* Priority dashboard and board: colors supplement explicit text labels. */
.priority-summary{margin:0 0 16px}
.priority-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.priority-high{--priority:#25663F;--priority-bg:#EAF5ED;--priority-edge:#83B893}
.priority-medium{--priority:#87520B;--priority-bg:#FFF4DE;--priority-edge:#DDB46E}
.priority-low{--priority:#445B78;--priority-bg:#EDF2F8;--priority-edge:#A4B4C8}
.priority-unassigned{--priority:#666B73;--priority-bg:#F0F1F3;--priority-edge:#C0C3C8}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .priority-high{--priority:#9BDBAE;--priority-bg:#213D2D;--priority-edge:#568B65}:root:not([data-theme="light"]) .priority-medium{--priority:#F4CD89;--priority-bg:#3C3021;--priority-edge:#9B7640}:root:not([data-theme="light"]) .priority-low{--priority:#BCD0E7;--priority-bg:#29364A;--priority-edge:#6D86A2}:root:not([data-theme="light"]) .priority-unassigned{--priority:#D1D4DB;--priority-bg:#30343C;--priority-edge:#747B86}}
:root[data-theme="dark"] .priority-high{--priority:#9BDBAE;--priority-bg:#213D2D;--priority-edge:#568B65}
:root[data-theme="dark"] .priority-medium{--priority:#F4CD89;--priority-bg:#3C3021;--priority-edge:#9B7640}
:root[data-theme="dark"] .priority-low{--priority:#BCD0E7;--priority-bg:#29364A;--priority-edge:#6D86A2}
:root[data-theme="dark"] .priority-unassigned{--priority:#D1D4DB;--priority-bg:#30343C;--priority-edge:#747B86}
.priority-tile{background:var(--priority-bg);color:var(--priority);border:1px solid var(--priority-edge);border-top:4px solid var(--priority-edge);border-radius:12px;padding:12px;min-width:0}
.priority-tile .n{font-size:26px;font-weight:650;font-variant-numeric:tabular-nums;line-height:1.1}
.priority-tile .l{font-size:13px;font-weight:600;margin-top:5px}
.priority-tile .detail{font-size:12px;margin-top:4px;line-height:1.35}
.priority-group{margin:12px 0 18px;border:1px solid var(--priority-edge);border-radius:12px;overflow:hidden}
.priority-group:last-child{margin-bottom:0}
.priority-heading{display:flex;justify-content:space-between;align-items:baseline;gap:8px;background:var(--priority-bg);color:var(--priority);border-bottom:1px solid var(--priority-edge);padding:10px 12px;font-weight:650}
.priority-heading h3{font-size:15px;margin:0}
.priority-heading .count{font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}
.priority-group .stageblock{padding:8px 12px 0;margin-bottom:4px}
.priority-group .stagehead .sn{text-transform:capitalize}
.priority-group .boardrow{padding:10px 4px}
.priority-group .boardrow:hover{background:var(--priority-bg)}
.priority-label{display:inline-block;background:var(--priority-bg);color:var(--priority);border:1px solid var(--priority-edge);font-size:12px;font-weight:600;border-radius:999px;padding:2px 8px;white-space:nowrap}
.add-investor-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:4px}
.add-investor-panel h2{margin:0 0 4px;color:var(--ink);font-size:16px}
@media(max-width:540px){.priority-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.priority-tile{padding:10px}.priority-group .boardrow .top{flex-wrap:wrap}.priority-group .stageblock{padding-left:9px;padding-right:9px}.add-investor-panel .cta{width:100%}}

/* v3.2 workspace navigation and primary investor list */
.workspace-nav{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:0 0 8px;overflow-x:auto;scrollbar-width:thin}
.workspace-nav button{border:0;border-bottom:3px solid transparent;color:var(--sub);background:none;white-space:nowrap;padding:12px 16px 10px;font-size:14px;font-weight:600;cursor:pointer}
.workspace-nav button[aria-selected="true"]{border-bottom-color:var(--accent);color:var(--ink)}
.workspace-nav button:hover{background:var(--soft)}
.navcount{display:inline-block;margin-left:4px;border-radius:999px;padding:1px 6px;background:var(--soft);font-size:11px;color:var(--ink)}
.storage-status{font-size:12px;color:var(--sub);margin:0 0 12px;overflow-wrap:anywhere}.storage-status.warn{color:var(--accent);font-weight:600}
.workspace-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 10px;flex-wrap:wrap}.workspace-title h2{font-size:18px;font-weight:650;margin:0}.list-title .rowbuttons{margin:0}
.primary-filters{grid-template-columns:minmax(0,2fr) minmax(0,1fr);margin-bottom:8px}
.filter-details{border-bottom:1px solid var(--line);padding:4px 0 8px;margin-bottom:8px}.filter-details summary{cursor:pointer;font-size:13px;color:var(--sub);font-weight:600;padding:3px 0}.filter-details .filters{margin:10px 0 2px}
.priority-group .boardrow{padding:10px 12px}.priority-group .boardrow+.boardrow{border-top:0}.priority-group .boardrow .tagrow{margin-top:4px}
.flat-list .boardrow{border-left:4px solid var(--priority-edge);padding:10px 12px;margin:6px 0;border-radius:8px;background:var(--panel);border-top:1px solid var(--line);border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.flat-list .boardrow:last-child{border-bottom:1px solid var(--line)}.flat-list .boardrow:hover{background:var(--priority-bg)}
.quick-add summary{display:flex;justify-content:space-between;align-items:center;cursor:pointer;font-weight:650;list-style:none}.quick-add summary::-webkit-details-marker{display:none}.quick-add[open] summary{padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--line)}
.quick-add[open] summary .small{transform:rotate(45deg)}.quick-add form .rowbuttons{margin-top:2px}
.pipeline-select{width:180px}.stage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px;align-items:start}.pipeline-stage{background:var(--bg);border:1px solid var(--line);border-radius:10px;overflow:hidden;min-width:0}.pipeline-stage .stagehead{margin:0;padding:10px;background:var(--soft)}.pipeline-stage .stagehead .sn{text-transform:capitalize}.pipeline-stage .stagehead .sc{white-space:nowrap}.stage-cards{padding:8px}.opportunity-card{display:block;width:100%;border:1px solid var(--line);border-left:4px solid var(--priority-edge);border-radius:8px;background:var(--panel);text-align:left;color:var(--ink);padding:9px;margin:0 0 6px;cursor:pointer;overflow-wrap:anywhere}.opportunity-card:last-child{margin-bottom:0}.opportunity-card:hover{background:var(--priority-bg)}.opportunity-card .name{font-size:14px;font-weight:650}.opportunity-card .small{margin-top:3px}.opportunity-card .priority-label{margin-top:5px;font-size:11px}.stage-empty{font-size:12px;color:var(--sub);padding:4px}.stage-grid .passed-stage{opacity:.85}
#view-investors .statrow{margin-bottom:10px}#view-investors .stat{padding:9px 12px}#view-investors .raise{margin-bottom:12px;padding:12px 14px}#view-investors .raise .roundpanel{padding:10px}#view-investors .priority-summary{margin-bottom:12px}#view-investors .priority-tile{padding:9px 10px}#view-investors .priority-tile .n{font-size:24px}
@media(max-width:680px){.stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-nav button{padding:10px 12px;font-size:13px}.primary-filters{grid-template-columns:minmax(0,1fr)}.workspace-title h2{font-size:17px}}
@media(max-width:460px){.stage-grid{grid-template-columns:1fr}.workspace-nav button{padding:10px 8px;font-size:12px}.pipeline-select{width:100%}.list-title .rowbuttons{gap:6px}.priority-group .boardrow{padding:10px}.workspace-title #dashTasks{font-size:12px}}


.workspace-nav{position:sticky;top:0;z-index:5;background:var(--bg)}
.stage-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.stage-tile{cursor:pointer;color:var(--ink);text-align:left;padding:10px 12px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 8px}.stage-tile:hover{background:var(--soft)}.stage-tile.selected{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.stage-tile-label{text-transform:capitalize;font-size:13px;font-weight:600}.stage-tile-number{font-size:22px;font-weight:650;font-variant-numeric:tabular-nums}.stage-tile .small{grid-column:1/-1}.opportunity-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.opportunity-grid .opportunity-card{margin:0;height:100%;text-align:left}.opportunity-grid .empty{grid-column:1/-1}
#addInvestorPanel{scroll-margin-top:64px}
@media(min-width:820px){#view-investors .raise .metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}#view-investors .raise .metrics span{min-height:15px}}
@media(max-width:680px){.opportunity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stage-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.stage-tile{padding:7px 8px;display:flex;flex-direction:column;align-items:flex-start;gap:0}.stage-tile-label{font-size:12px}.stage-tile-number{font-size:20px}}
@media(max-width:460px){.opportunity-grid{grid-template-columns:1fr}}
/* Cloud status and authentication gate */
[hidden]{display:none!important} .cloud-locked header.band,.cloud-locked #home,.cloud-locked #cloudBar,.cloud-locked .sheet,.cloud-locked #toast{display:none!important} body:not(.cloud-locked) #cloudGate{display:none!important} .cloud-gate-card{margin-top:20vh;max-width:520px;margin-left:auto;margin-right:auto;padding:24px}.cloud-gate-card h1{font-size:22px;margin-top:0}.cloud-wrap{padding-bottom:8px}.cloud-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:8px 12px;border:1px solid var(--line);background:var(--panel);border-radius:9px;font-size:12px;color:var(--sub)}.cloud-row[data-state="ok"] #cloudState{color:var(--ok)}.cloud-row[data-state="warn"] #cloudState{color:var(--accent);font-weight:650}.cloud-row .rowbuttons{margin:0;gap:5px} #cloudState{overflow-wrap:anywhere}

/* Briefing-first investor profile */
#detail .wrap{max-width:1180px}
.profile-header{gap:12px;align-items:center;padding:12px 0 0;margin-bottom:16px}
.profile-heading{flex:1;min-width:0}.profile-heading h2{font-size:22px;line-height:1.2;overflow-wrap:anywhere}.profile-heading .detsub{font-size:12.5px;margin:4px 0 0;line-height:1.4}
.profile-actions{display:flex;gap:8px;flex-wrap:wrap}.profile-actions button{white-space:nowrap;font-size:14px}
.profile-tabs{display:flex;gap:4px;flex-basis:100%;border-bottom:1px solid var(--line)}
.profile-tab{border:0;border-bottom:3px solid transparent;background:none;color:var(--sub);padding:10px 15px;font-size:14px;font-weight:600;cursor:pointer}
.profile-tab[aria-pressed="true"]{border-bottom-color:var(--accent);color:var(--ink)}
.brief-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.brief-col{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:18px;overflow-wrap:anywhere}
.brief-col h3{font-size:17px;margin:0 0 14px;line-height:1.3}.brief-col .sectiontitle{align-items:flex-start;margin:0 0 12px}.brief-col .sectiontitle h3{margin:0}
.brief-section{margin:0;padding:13px 0;border-top:1px solid var(--line)}.brief-section:last-child{padding-bottom:0}.brief-section h4{font-size:12px;color:var(--sub);font-weight:650;letter-spacing:.035em;text-transform:uppercase;margin:0 0 7px}.brief-section p{font-size:14px;line-height:1.5;margin:0;white-space:pre-wrap}.brief-section p+p{margin-top:8px}
.brief-meta{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px 14px;font-size:13px;margin:0 0 12px}.brief-meta dt{color:var(--sub)}.brief-meta dd{margin:0}.brief-col a{color:var(--ink);text-decoration:underline;text-underline-offset:3px}.brief-col .small{line-height:1.45}
.brief-rounds{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}.brief-round{border:1px solid var(--line);background:var(--bg);border-radius:10px;padding:11px;min-width:0}.brief-round h4{font-size:12px;color:var(--sub);margin:0 0 4px}.brief-round .stage-name{font-size:16px;font-weight:650;text-transform:capitalize;line-height:1.25}.brief-round .round-amount{font-size:14px;font-weight:600;margin:7px 0 4px}.brief-round .small{margin-top:5px}.brief-round .pass-note{font-size:13px;color:var(--sub);white-space:pre-wrap;margin-top:7px}
.brief-task,.brief-material,.brief-source{padding:9px 0;border-bottom:1px dashed var(--line)}.brief-task:last-child,.brief-material:last-child,.brief-source:last-child{border-bottom:0;padding-bottom:0}.brief-task:first-of-type,.brief-material:first-of-type,.brief-source:first-of-type{padding-top:0}.brief-task strong,.brief-material strong,.brief-source strong{font-size:14px;font-weight:600;display:block}.brief-task .late{color:var(--accent);font-weight:600}.brief-task p,.brief-source p{font-size:13px;margin-top:5px}
.brief-col details{margin:8px 0 0}.brief-col summary{font-size:13px;font-weight:600;color:var(--sub);cursor:pointer}.brief-col details .raw{white-space:pre-wrap;font-size:14px;margin-top:8px}.brief-feedback{margin:5px 0 0;padding-left:18px;font-size:14px}.brief-feedback li{margin:3px 0}.brief-col .brief-feedback-label{font-size:13px;font-weight:600;margin-top:9px}.profile-history{margin-top:22px}.profile-history h2{font-size:16px;font-weight:650;margin:0 0 10px}#editorView #dirtyNote{margin-bottom:12px}
@media(max-width:760px){.brief-grid{grid-template-columns:1fr;gap:12px}.brief-col{padding:14px}.profile-heading h2{font-size:18px}.profile-header{gap:8px}.profile-heading{flex-basis:calc(100% - 78px)}.profile-actions{flex-basis:100%;justify-content:flex-end}.profile-tabs{margin-top:2px}.profile-tab{padding:9px 12px}.brief-rounds{gap:6px}.brief-round{padding:9px}.brief-round .stage-name{font-size:14px}}

/* v3.4 activity-linked material records */
.activity-materials{margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.activity-materials .sectiontitle{flex-wrap:wrap}.activity-materials h3{font-size:16px}.activity-materials .small{line-height:1.4}
.activity-materials .itemcard{margin:10px 0 0}.activity-materials .itemhead{gap:8px}.activity-materials .itemhead .mini{flex-shrink:0}
.material-history{margin:10px 0 4px;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--bg);overflow-wrap:anywhere}
.material-history h4{margin:0 0 8px;font-size:13px}.material-history .brief-material strong{font-size:14px}.material-history p,.brief-material p{margin:3px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.material-method{font-size:12px;font-weight:600;color:var(--ink)}

/* v3.5 single-raise layout */
.roundgrid,.brief-rounds{grid-template-columns:1fr}.safe-potential{color:#96621c;font-weight:600}.tag.safe-potential{border-color:#b28b45;background:rgba(217,155,69,.10)}
@media(prefers-color-scheme:dark){.safe-potential{color:#e2b978}}

/* v3.6: explicit, accessible batch import actions. */
.list-title .investor-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0}
.investor-actions button{min-height:40px;white-space:normal}
.batch-import-help{margin:0 0 12px}
#bulk .upload-label{display:block;font-weight:600;font-size:13px;margin:0 0 6px}
#bulk .toolbar{align-items:center}
#bulkFile{max-width:100%}
@media(max-width:540px){.list-title .investor-actions{width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}.investor-actions button{width:100%;padding:10px 8px}.investor-actions button.primary{font-size:13px}}

.prior-tag{border-color:#9babc7;color:var(--ink);font-weight:600;}

.filters .field{min-width:0}.filters .field input,.filters .field select{box-sizing:border-box;max-width:100%}

/* v3.9 investor status: Prospect / SAFE investor / Seed investor */
.status-prospect{--priority:#8A4B12;--priority-bg:#FCEFE2;--priority-edge:#E3A76F}
.status-safe{--priority:#1E5A56;--priority-bg:#E3F2F0;--priority-edge:#7FB8B2}
.status-seed{--priority:#3D3A78;--priority-bg:#ECEBF8;--priority-edge:#A29FD6}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .status-prospect{--priority:#F3C08C;--priority-bg:#3D2C1C;--priority-edge:#9A6A3A}:root:not([data-theme="light"]) .status-safe{--priority:#A5DAD4;--priority-bg:#1F3A38;--priority-edge:#4F8A84}:root:not([data-theme="light"]) .status-seed{--priority:#C9C6F2;--priority-bg:#2D2B4A;--priority-edge:#6F6BAA}}
:root[data-theme="dark"] .status-prospect{--priority:#F3C08C;--priority-bg:#3D2C1C;--priority-edge:#9A6A3A}
:root[data-theme="dark"] .status-safe{--priority:#A5DAD4;--priority-bg:#1F3A38;--priority-edge:#4F8A84}
:root[data-theme="dark"] .status-seed{--priority:#C9C6F2;--priority-bg:#2D2B4A;--priority-edge:#6F6BAA}
.priority-grid.status-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:6px}
.tag.status-tag{background:var(--priority-bg);color:var(--priority);border-color:var(--priority-edge);font-weight:600}
.primary-filters{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr)}
@media(max-width:680px){.primary-filters{grid-template-columns:minmax(0,1fr)}}

/* v3.11 raise toggle: Seed / SAFE / next raise */
.raise-toggle{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden;background:var(--panel);margin:0 auto 0 12px}
.raise-toggle .raise-tab{border:0;background:none;color:var(--sub);font:inherit;font-size:13px;font-weight:600;padding:7px 14px;cursor:pointer;white-space:nowrap}
.raise-toggle .raise-tab+.raise-tab{border-left:1px solid var(--line)}
.raise-toggle .raise-tab.selected{background:var(--navy);color:var(--oncream)}
.status-next{--priority:#8A4B12;--priority-bg:#FCEFE2;--priority-edge:#E3A76F}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .status-next{--priority:#F3C08C;--priority-bg:#3D2C1C;--priority-edge:#9A6A3A}}
:root[data-theme="dark"] .status-next{--priority:#F3C08C;--priority-bg:#3D2C1C;--priority-edge:#9A6A3A}
@media(max-width:680px){.workspace-title{flex-wrap:wrap}.raise-toggle{order:3;margin:8px 0 0;width:100%}.raise-toggle .raise-tab{flex:1}}

/* v3.12 user-defined campaigns */
.raise-toggle{max-width:100%;overflow-x:auto;scrollbar-width:thin}
.raise-toggle .raise-tab{flex:0 0 auto}
.raise-toggle .raise-add{color:var(--accent)}
.campaign-row{margin:-4px 0 8px;padding-bottom:10px;border-bottom:1px solid var(--line)}
@media(max-width:680px){.raise-toggle .raise-tab{flex:1 0 auto}}

/* v3.13 investor tags */
.tag.user-tag{background:var(--soft);color:var(--ink);border-color:var(--line)}

/* v3.17 companies and the shared investor inventory */
.company-bar{display:flex;align-items:center;gap:10px;margin:0 0 10px;flex-wrap:wrap}
.company-bar .raise-toggle{margin:0}
.inv-filters{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
.inv-row{display:flex;align-items:center;gap:12px;padding:10px 4px;border-top:1px solid var(--line)}
.inv-row:first-child{border-top:0}
.inv-main{flex:1;min-width:0;text-align:left;background:none;border:0;padding:0;cursor:pointer;color:inherit;font:inherit;display:grid;gap:6px}
.inv-main .name{font-weight:650;font-size:15px}
.inv-add{flex:0 0 auto;white-space:nowrap}
.inv-in{flex:0 0 auto;color:var(--sub)}
@media(max-width:680px){.inv-row{flex-direction:column;align-items:stretch}.inv-filters{grid-template-columns:minmax(0,1fr)}}

/* v3.18 company switcher above the company name; inventory as a top-level view */
.company-bar{max-width:1000px;margin:0 auto;padding:14px 16px 0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
body.cloud-locked .company-bar{display:none}
.inventory-btn{margin-left:auto;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--ink);font:inherit;font-size:13px;font-weight:600;padding:7px 14px;cursor:pointer;white-space:nowrap}
.inventory-btn.selected{background:var(--navy);color:var(--oncream);border-color:var(--navy)}
.inventory-btn .navcount{margin-left:6px}
.inv-filters{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr)}
@media(max-width:680px){.inventory-btn{margin-left:0}.inv-filters{grid-template-columns:minmax(0,1fr)}}
/* v4.1 outreach person */
.tag.owner-tag{color:var(--ink);font-weight:600;border-color:var(--navy)}

/* v4.2 commitments and closing checklist */
.commitments{border-top:1px solid var(--line);padding-top:10px;margin-top:4px}
.commitments h4{margin:0 0 6px;font-size:14px}
.itemhead .mini{margin-left:6px}
details.commitment>summary{cursor:pointer;font-size:13px;font-weight:600}
details.commitment>summary .state{margin-left:8px}
details.commitment[open]>summary{margin-bottom:10px}
table.checklist td:nth-child(1){width:22%}table.checklist td:nth-child(2){width:30%}
/* a details element's content box does not inherit box-sizing from the page */
details.commitment,details.commitment *{box-sizing:border-box}
.checklist-wrap{overflow-x:auto}
table.checklist{width:100%;border-collapse:collapse;font-size:13px}
table.checklist th{text-align:left;font-weight:600;color:var(--sub);padding:8px 10px;border-bottom:1px solid var(--line);vertical-align:bottom}
table.checklist td{padding:8px 10px;border-bottom:1px solid var(--line);vertical-align:top}
table.checklist td.num,table.checklist th:nth-child(3),table.checklist th:nth-child(4){text-align:right;white-space:nowrap}
table.checklist tr.total td{font-weight:650;border-bottom:0}
.linkish{background:none;border:0;padding:0;font:inherit;font-weight:650;color:var(--ink);cursor:pointer;text-align:left}
.linkish:hover{text-decoration:underline}
.step{white-space:nowrap}.step.done{color:#25663F;font-weight:600}.step.todo{color:var(--sub)}
.state{display:inline-block;font-size:12px;font-weight:600;border-radius:999px;padding:2px 8px;border:1px solid var(--line);white-space:nowrap}
.state-closed{background:#EAF5ED;color:#25663F;border-color:#83B893}
.state-part,.state-money,.state-sign,.state-nosig{background:#FFF4DE;color:#87520B;border-color:#DDB46E}
.state-docs{background:#FCEFE2;color:#8A4B12;border-color:#E3A76F}
.state-open{background:#F0F1F3;color:#666B73;border-color:#C0C3C8}
.checklist-lines{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:8px}
.checklist-lines li{border-top:1px solid var(--line);padding-top:8px}
.cl-title{font-size:13px;font-weight:600}
.cl-steps{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:3px;font-size:12px}

/* v4.3 passed pill and investor table view */
.tag.passed-tag{background:#FCEBEB;color:#A32D2D;border-color:#E0A3A3;font-weight:600}
.stage-name.passed{color:#C0392B}
.view-toggle{display:inline-flex;margin-right:8px}
.view-toggle .mini{border-radius:0;margin:0}
.view-toggle .mini:first-child{border-radius:999px 0 0 999px}
.view-toggle .mini:last-child{border-radius:0 999px 999px 0;border-left:0}
.view-toggle .mini[aria-pressed=true]{background:var(--navy);color:#fff;border-color:var(--navy)}
table.investor-table td:nth-child(1){width:24%}table.investor-table td:nth-child(2){width:auto;white-space:nowrap}
table.investor-table td.note{width:30%;color:var(--sub)}
table.investor-table td.nowrap,table.investor-table th{white-space:nowrap}
table.investor-table th:nth-child(4),table.investor-table th:nth-child(5){text-align:right}
table.investor-table .stage-cell{text-transform:capitalize}
.sortbtn{font-weight:600;color:var(--sub)}
/* v4.4 capital-certainty tracker */
#forecast{grid-template-columns:1fr}.raise .fundraising-bar{height:24px;background:#d1d5db;border-radius:6px;display:flex;overflow:hidden}.fundraising-bar>div{height:100%;flex-shrink:0}.fundraising-bar .funded,.legend.funded{background:#22c55e}.fundraising-bar .awaiting,.legend.awaiting{background:#86efac}.fundraising-bar .verbal,.legend.verbal{background:#fbbf24}.legend.uncovered{background:#d1d5db}.legend{display:inline-block;width:11px;height:11px;border-radius:2px;margin-right:6px;vertical-align:middle}.sensitivity{margin-top:10px;padding:10px;border:1px solid rgba(250,248,243,.35);border-radius:8px}.sensitivity summary{cursor:pointer;font-weight:600}.sensitivity .small{color:inherit;opacity:.9}.scenario-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.scenario-row input{flex:1;min-width:100px;accent-color:#fbbf24}.transaction-summary{padding:8px;border:1px solid var(--line);border-radius:8px}.review-note{color:#fbbf24}.commitments .itemhead{gap:8px;flex-wrap:wrap}

.priority-tile.capital-funded{border-top:4px solid #22c55e;background:color-mix(in srgb,var(--panel) 88%,#22c55e 12%)}.priority-tile.capital-awaiting{border-top:4px solid #86efac;background:color-mix(in srgb,var(--panel) 88%,#86efac 12%)}.priority-tile.capital-verbal{border-top:4px solid #fbbf24;background:color-mix(in srgb,var(--panel) 88%,#fbbf24 12%)}
