.analysis-list-row{cursor:pointer}.analysis-list-row:hover td{background:var(--accent-soft)}.analysis-list-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
/* A focused sheet uses the same records and controls in a light workspace. */
body.sheet-open{--violet-soft:#f2effb;--amber-soft:#fff5db;--coral-soft:#fcecf0;--neutral-soft:#f0f1f6;--accent-hover:#5440b8;--accent-ink:#fff}
.modal-backdrop:has(#cell-details-form){display:flex;justify-content:flex-end;align-items:stretch;padding:0;background:#080a1633}.modal:has(#cell-details-form){position:relative;display:flex;flex-direction:column;width:min(620px,100vw);height:100dvh;max-height:100dvh;border-radius:0;padding:24px;overflow:hidden;--surface:#fff;--control:#f6f7fa;--ink:#242633;--muted:#555d6e;--line:#e0e3ea;--accent:#5843bb;--neutral-soft:#f0f1f6;color:var(--ink);background:var(--surface);color-scheme:light}.modal:has(#cell-details-form)>h2{padding-right:36px;font-size:20px}.modal:has(#cell-details-form)>.subtext{font-size:12px;margin-bottom:16px}#cell-details-form{min-height:0;overflow-y:auto;overscroll-behavior:contain;flex:1}#cell-details-form>.actions{position:sticky;bottom:0;background:#fff;padding:14px 0;margin:14px 0 0;border-top:1px solid #e0e3ea}.cell-panel-close{position:absolute;right:18px;top:15px;min-width:32px;font-size:24px;line-height:1;padding:5px;color:#555d6e;border:0;background:transparent}.cell-result-error{padding:16px;margin-bottom:20px;background:#fff7e9;border:1px solid #e7cfa2;border-radius:8px;color:#704919;font-size:13px;line-height:1.65}.cell-result-error h3{font-size:13px;color:#704919;margin:0 0 8px}.cell-result-error p{margin:8px 0;white-space:pre-wrap;overflow-wrap:anywhere}.cell-result-error small{font-size:11px}.cell-result-previous{font-size:12px;color:#666e7e;margin:16px 0 8px}.cell-result-formula{margin:18px 0;color:#424b5d;font-size:12px}.cell-result-formula pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f5f6fa;border-radius:6px;padding:14px;margin-top:12px}
.cell-result-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:11px;color:#586074;margin-bottom:14px}
.cell-result-value{white-space:pre-wrap;overflow-wrap:anywhere;padding:20px;border:1px solid #dfe3eb;border-radius:8px;background:#fff;color:#242633;font-size:14px;line-height:1.8}
.ai-answer-row{min-width:0;border:1px solid var(--line);border-radius:9px;padding:16px;margin:16px 0;background:var(--control)}.ai-answer-row legend{padding:0 7px;color:var(--ink);font-weight:600;font-size:12px}.ai-answer-row label{display:grid;gap:7px;font-size:12px;color:var(--muted)}.ai-answer-row label.check-row{display:flex;margin:12px 0}.ai-answer-row textarea,.ai-answer-row input:not([type=checkbox]),.ai-answer-row select{width:100%;max-width:100%;box-sizing:border-box}.ai-answer-row .form-field{margin-bottom:12px}.answer-choice-tags{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.answer-choice-tags span,.answer-choice-badge{border-radius:5px;padding:3px 8px;font-size:11px;background:var(--accent-soft);color:var(--accent)}.answer-choice-badge{display:inline-block!important;width:fit-content;max-width:100%}.answer-choice-badge.choice-high{background:#e8f6ed;color:#20643a}.answer-choice-badge.choice-medium{background:#fff3d9;color:#805900}.answer-choice-badge.choice-low{background:#fcecee;color:#923f53}.answer-choice-badge.choice-neutral{background:#eef0f5;color:#555d6e}
.ai-run-settings{display:grid;gap:12px;margin:20px 0}.ai-run-settings>div{display:grid;gap:6px;padding:12px;background:var(--control);border:1px solid var(--line);border-radius:6px}.ai-run-settings span,.ai-run-settings small{font-size:11px;color:var(--muted)}.ai-run-status>span{flex:1;line-height:1.6}.ai-cell-state{display:flex;align-items:center;gap:8px;color:#5843bb!important;font-weight:600}.ai-cell-state i{height:7px;width:7px;flex-shrink:0;border-radius:50%;background:#8978d4;animation:ai-cell-pulse 1.5s ease-in-out infinite}.ai-cell-error{color:#7a4b13!important}.ai-cell-error i{animation:none;background:#c69a4a}@keyframes ai-cell-pulse{50%{opacity:.3;transform:scale(.8)}}@media(prefers-reduced-motion:reduce){.ai-cell-state i{animation:none}}
.cell-result-explanation{margin:22px 0;color:#424b5d;font-size:13px;line-height:1.75}.cell-result-explanation h3{color:#242633;font-size:13px;margin-bottom:8px}.cell-result-explanation p{white-space:pre-wrap}
.cell-result-sources{border-top:1px solid #e0e3ea;padding-top:14px;margin-bottom:18px}.cell-result-sources summary{cursor:pointer;color:#494273;font-weight:600;font-size:13px}.cell-source{padding:16px 0;border-bottom:1px solid #e0e3ea;color:#424b5d;line-height:1.7;font-size:12px}.cell-source blockquote{margin:12px 0;padding:12px 14px;border-left:3px solid #a99ada;background:#f5f3fb;color:#343342;white-space:pre-wrap;overflow-wrap:anywhere}.cell-source a{color:#5843bb}
/* The records-v2 editor is embedded without body.sheet-open. Scope the full
   light palette to its actual root as well as the older focused-sheet route. */
.sheet-workspace>.column-popover{position:fixed;z-index:80;min-width:min(185px,calc(100vw - 16px));max-width:min(250px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box}
body.sheet-open,.sheet-workspace{--canvas:#fff;--surface:#fff;--surface-raised:#f9f9fb;--control:#fff;--ink:#171717;--muted:#4b4b52;--subtle:#5d5d66;--line:#e5e5eb;--line-strong:#b1b2bd;--accent:#6550c8;--accent-hover:#5440b8;--accent-ink:#fff;--accent-soft:#f2effb;--violet:#6550c8;--violet-soft:#f2effb;--neutral-soft:#f0f1f6;--amber:#805400;--amber-soft:#fff5db;--coral:#a62649;--coral-soft:#fcecf0;color:var(--ink);color-scheme:light}
body.sheet-open{background:#0a0b11}
.sheet-open .button.primary,.sheet-workspace .button.primary{color:#fff;background:var(--accent);border-color:var(--accent)}
.sheet-shell{--sheet-gutter:1cm;margin:var(--sheet-gutter);width:calc(100% - 2 * var(--sheet-gutter));height:calc(100dvh - 2 * var(--sheet-gutter));min-height:0;box-sizing:border-box;border-radius:7px;overflow:hidden;background:#fff}
.sheet-workspace{height:100%;display:flex;flex-direction:column;min-width:0;background:#fff}
.sheet-titlebar{height:54px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;border-bottom:1px solid var(--line);position:relative;z-index:60}
.sheet-title{display:flex;align-items:center;gap:12px;min-width:0}.sheet-title h1{font-size:15px;font-weight:600;letter-spacing:-.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.sheet-title img{flex-shrink:0}
.sheet-titlebar .button{min-height:30px;padding:4px 8px}.sheet-list-actions{position:relative;flex-shrink:0}.sheet-list-actions>summary{font-size:12px;cursor:pointer;list-style:none;padding:8px;color:var(--muted)}
.sheet-actions-popover,.sheet-filter-popover{position:absolute;background:#fff;border:1px solid var(--line-strong);border-radius:7px;box-shadow:0 8px 24px #24233518;padding:10px;z-index:60}.sheet-actions-popover{right:0;top:36px;min-width:240px;display:grid;gap:5px}.sheet-actions-popover .button{text-align:left;justify-content:flex-start}
.sheet-commandbar{display:flex;align-items:center;gap:8px;min-height:48px;padding:6px 16px;border-bottom:1px solid var(--line);position:relative;z-index:50;flex-wrap:wrap;flex-shrink:0}
.sheet-view-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.sheet-view-tools select{width:auto;min-width:125px;max-width:210px;border:0;background:#fff;font-size:12px;padding:6px 8px;min-height:30px}
.sheet-commandbar .button{font-size:12px;min-height:30px;padding:5px 9px;box-shadow:none}.sheet-commandbar .button.text{color:var(--muted)}.sheet-command-end{margin-left:auto}.sheet-row-count{font-size:11px;color:var(--subtle);padding:0 5px;white-space:nowrap}
.sheet-filters{position:relative}.sheet-filters>summary{font-size:12px;list-style:none;cursor:pointer;padding:8px;color:var(--muted)}.sheet-filters[open]>summary{background:var(--accent-soft);border-radius:4px;color:var(--accent)}
.sheet-filter-popover{top:36px;left:0;width:min(530px,calc(100vw - 40px));max-height:min(460px,65vh);overflow:auto}.sheet-filter-popover .filter-bar{padding:10px;gap:12px;display:grid;grid-template-columns:1fr 1fr;border:0}.sheet-filter-popover .filter-field{min-width:0}.sheet-filter-popover .filter-field:first-child{grid-column:1/-1}.sheet-filter-popover .column-filter{padding:14px 10px;border-top:1px solid var(--line);flex-wrap:wrap}.sheet-filter-popover .column-filter>*{max-width:100%;min-width:0}
.sheet-selection{display:flex;align-items:center;gap:10px;padding:6px 16px;min-height:39px;border-bottom:1px solid var(--line);background:var(--accent-soft);font-size:12px;flex-wrap:wrap}.sheet-selection .button{min-height:26px;font-size:11px;padding:4px 9px}
.sheet-workspace .spreadsheet{flex:1;min-height:0;max-height:none;border-radius:0;overflow-x:hidden;overflow-y:auto;scrollbar-color:#ccced8 #f6f6f9;background:#fff}
.sheet-workspace .spreadsheet th{height:44px;padding:0 10px!important;background:#fff;vertical-align:middle;overflow:visible;font-size:12px;text-transform:none;letter-spacing:0;border-bottom:1px solid var(--line);color:var(--muted)}
.sheet-workspace .spreadsheet th.grid-pinned,.sheet-workspace .spreadsheet th.grid-selector{background:#fff}.sheet-workspace .spreadsheet[data-table-mode=analysis] .grid-selector{width:80px!important;min-width:80px!important;max-width:80px!important;padding:0 8px!important}.sheet-workspace .spreadsheet .grid-selector{padding:0 8px!important}.sheet-workspace .spreadsheet .grid-pinned{background:#fff}.sheet-workspace .spreadsheet tr:hover td{background:#faf9fd}
.sheet-column-heading{display:flex;align-items:center;gap:7px;min-width:0}.column-type-symbol{font-size:10px;color:#777486;font-weight:600;flex-shrink:0;min-width:14px}.sheet-column-heading .column-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;padding:8px 0!important;width:100%;font-size:12px;font-weight:500;color:var(--ink);background:transparent;border:0;box-shadow:none;min-height:32px}.sheet-column-heading .column-heading>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sheet-column-heading .column-heading>span:last-child{color:var(--subtle);font-size:13px}
.sheet-workspace th.column-menu-open{z-index:35!important}.column-popover{position:absolute;top:42px;left:4px;min-width:185px;max-width:250px;padding:5px;background:#fff;border:1px solid var(--line-strong);border-radius:6px;box-shadow:0 6px 18px #24233520;z-index:40}.column-popover .button{display:flex;justify-content:flex-start;width:100%;border:0;background:transparent;font-size:12px;min-height:32px;padding:7px 9px;color:var(--ink)}.column-popover .button:hover,.column-popover .button:focus-visible{background:var(--accent-soft)}
.grid-cell-content{position:relative}.sheet-workspace .grid-cell-button{min-height:36px;height:36px;padding:6px 12px;font-size:12px;line-height:1.5}.sheet-workspace .grid-cell-button>span{-webkit-line-clamp:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;padding-right:18px}.sheet-workspace .grid-cell-button small{display:none}.sheet-workspace .cell-not-run{color:var(--subtle)}.sheet-workspace .cell-stale{color:var(--amber)}
.sheet-workspace .grid-wrap-text .grid-cell-button{height:auto;min-height:36px}.sheet-workspace .grid-wrap-text .grid-cell-button>span{white-space:pre-wrap;overflow-wrap:anywhere;-webkit-line-clamp:unset;text-overflow:clip;overflow:visible}.grid-wrap-text .grid-cell-button>span{display:block;-webkit-line-clamp:unset;white-space:pre-wrap;overflow:visible}.grid-wrap-text .grid-row-controls{align-items:flex-start}.sheet-workspace .grid-cell-content:has(.grid-cell-read) .grid-cell-button>span{padding-right:38px}.grid-cell-read{position:absolute;right:4px;top:5px;min-height:27px!important;padding:3px 5px!important;font-size:10px!important;opacity:0;color:var(--accent)!important;background:var(--surface)!important}.grid-cell-content:hover .grid-cell-read,.grid-cell-content:focus-within .grid-cell-read{opacity:1}.grid-cell-read:focus-visible{opacity:1;outline:2px solid var(--accent)}.grid-value-reader{font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;max-height:60vh;overflow:auto;padding:12px;border:1px solid var(--line);border-radius:6px}.saved-answer-preview{margin:14px 0}.saved-answer-preview td{white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top}.saved-answer-lineage{margin:14px 0;padding:12px;border:1px solid #d9d4ec;border-radius:6px;color:#333;background:#f6f4fc}.saved-answer-lineage p{margin:4px 0 8px}@media(max-width:760px){.sheet-workspace .grid-wrap-text .grid-cell-button{min-height:44px}.grid-cell-read{opacity:1;min-height:32px!important}.saved-answer-preview{overflow:auto}}
.grid-cell-run{position:absolute;right:5px;top:8px;min-height:25px!important;width:25px;padding:3px!important;font-size:10px!important;border:1px solid var(--line-strong);background:#fff!important;color:var(--accent);opacity:0;box-shadow:none!important}.grid-cell-content:hover .grid-cell-run,.grid-cell-content:focus-within .grid-cell-run{opacity:1}.grid-cell-run:focus-visible{opacity:1;outline:2px solid var(--accent)}
.sheet-workspace .table-footer{flex-shrink:0;height:44px;padding:7px 14px;border-top:1px solid var(--line);background:#fff;justify-content:flex-end;font-size:11px}.sheet-workspace .table-footer>span{display:none}.sheet-workspace .table-footer .button{min-height:27px;font-size:11px;padding:4px 8px}
.table-scroll-dock{display:none}.sheet-workspace .table-scroll-dock{display:block;flex:1;min-width:64px;max-width:1200px;margin-right:auto;padding:5px 9px;border:1px solid var(--line);border-radius:999px;background:#fff;box-shadow:0 2px 8px #24233514}.sheet-workspace .table-scroll-dock[hidden]{display:none}.table-scroll-track{height:15px;overflow-x:scroll;overflow-y:hidden;scrollbar-color:#a6a2b5 #efedf4;scrollbar-width:auto;border-radius:999px;overscroll-behavior-x:contain}.table-scroll-track:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.table-scroll-width{height:1px}.table-scroll-track::-webkit-scrollbar{height:12px}.table-scroll-track::-webkit-scrollbar-track{background:#efedf4;border-radius:999px}.table-scroll-track::-webkit-scrollbar-thumb{background:#a6a2b5;border:2px solid #efedf4;border-radius:999px}
.table-pagination{justify-content:flex-end;flex-shrink:0}.table-page-size{display:flex;align-items:center;gap:5px;white-space:nowrap}.table-page-size select{width:60px;min-height:27px;padding:3px 5px;font-size:11px}.sheet-enrichment-status{background:#fff8e9;color:var(--ink);font-size:12px}.sheet-enrichment-status>span{flex:1;min-width:180px}@media(max-width:760px){.table-pagination{flex:1 1 100%;gap:6px}.sheet-workspace .table-scroll-dock{flex-basis:100%;max-width:none}.sheet-workspace .table-footer{gap:5px}.table-page-size select{width:54px}.sheet-enrichment-status{padding:8px}}
.sheet-open .modal-backdrop{background:#080a1673;z-index:200}.sheet-open .modal{box-shadow:0 12px 48px #15142633}.sheet-open .column-panel{border-left:1px solid var(--line-strong)}.column-kind-menu{display:grid;grid-template-columns:1fr 1fr;gap:8px}.button.column-kind-choice{display:flex;align-items:flex-start;justify-content:center;flex-direction:column;text-align:left;gap:6px;padding:15px;min-height:86px;background:var(--control);color:var(--ink);white-space:normal}.column-kind-choice strong{font-size:13px}.column-kind-choice span{font-size:11px;font-weight:400;line-height:1.5;color:var(--muted)}.button.column-kind-choice:hover:not(:disabled){background:var(--accent-soft);border-color:var(--accent)}
.column-config-section{padding-top:16px;margin-top:16px;border-top:1px solid var(--line)}.column-panel h3{font-size:13px;margin:14px 0 10px}.column-prompt-presets{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:10px}.column-panel .variable-chips{max-height:150px;overflow:auto;padding:5px 0;gap:5px}.column-panel .variable-chips .button{display:flex;flex-direction:column;align-items:flex-start;font-size:11px}.column-panel .variable-chips small{font-size:10px;color:var(--subtle);font-weight:400}.column-panel .variable-chips [hidden]{display:none}.column-panel #column-template{min-height:140px}.column-panel .actions{flex-wrap:wrap}
.filter-builder-modal{width:min(980px,calc(100vw - 32px));max-width:100%;padding:20px;max-height:calc(100dvh - 80px)}
.saved-answer-preview article{padding:10px 0;border-bottom:1px solid var(--line)}.saved-answer-preview article small{display:block;color:var(--subtle);margin-top:3px}.saved-answer-preview article p{white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0}
.filter-builder-modal h2{font-size:17px;margin:0 0 6px}.filter-builder-modal>.subtext{font-size:12px;margin-bottom:16px}
.filter-scope{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}.filter-scope label{font-weight:600}.filter-scope .status-note{margin:0}.filter-scope input{width:100%;min-width:0;box-sizing:border-box}
.filter-builder-modal input,.filter-builder-modal select,.filter-builder-modal textarea{min-height:34px;padding:7px 9px;font-size:12px}
.filter-builder-modal .actions{margin-top:15px}
.filter-group{margin:0;padding:12px;border:1px solid var(--line);border-radius:7px;min-width:0;background:var(--surface)}
.filter-group-row{display:grid;grid-template-columns:68px minmax(0,1fr);align-items:start;gap:8px;margin-top:10px}
.filter-group-row>.filter-group{background:var(--surface-raised)}
.filter-group-heading{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted);margin-bottom:8px}
.filter-group-heading>.filter-remove{margin-left:auto}
.filter-condition{display:flex;flex-wrap:wrap;align-items:start;gap:8px;margin-top:8px;min-width:0}
.filter-join-word,.filter-condition>.filter-connector{width:68px;flex-shrink:0;font-size:11px;font-weight:600}
.filter-join-word{padding:10px 0;color:var(--muted)}
.filter-group-row>.filter-connector{width:68px}
.filter-condition>.filter-field-picker{width:210px;min-width:125px;flex:1.2}
.filter-condition>.filter-operator{width:160px;min-width:110px;flex:1}
.filter-condition>.filter-value,.filter-condition>textarea{width:150px;min-width:80px;flex:1}
.filter-condition>textarea{resize:vertical}
.filter-condition>.filter-remove{flex-shrink:0;margin-left:auto}
.filter-remove{min-height:29px!important;padding:3px 7px!important;font-size:16px!important;line-height:1}
.filter-range{display:flex;align-items:center;gap:5px;flex:1;min-width:125px}.filter-range input{width:60px;flex:1;min-width:45px}.filter-range span{font-size:10px;color:var(--muted)}
.filter-add-actions{display:flex;gap:6px;margin-top:11px}.filter-add-actions .button{font-size:11px;min-height:27px;padding:4px 7px}
.filter-empty{font-size:12px;color:var(--muted);margin:3px 0 8px}
.filter-expression{margin-top:12px;padding:10px 12px;background:var(--control);border-radius:5px;font-size:11px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
.filter-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;font-size:12px;color:var(--muted)}.filter-summary .button{font-size:11px}
.filter-field-picker{position:relative;min-width:0}.filter-field-input{position:relative}.filter-field-input input{width:100%;padding-right:29px}
.filter-field-toggle{position:absolute;right:1px;top:1px;width:27px;min-height:32px!important;padding:0!important;border:0!important;color:var(--muted)}
.filter-field-options{position:absolute;top:calc(100% + 4px);left:0;width:max(240px,100%);max-width:calc(100vw - 60px);max-height:210px;overflow:auto;background:var(--surface);border:1px solid var(--line-strong);border-radius:6px;padding:4px;box-shadow:0 6px 20px #24233520;z-index:20}
.filter-field-options[hidden]{display:none}
.filter-field-options [role=option]{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:8px;text-align:left;background:transparent;border:0;border-radius:3px;color:var(--ink);font-size:12px;cursor:pointer}
.filter-field-options [role=option] span{overflow-wrap:anywhere}.filter-field-options [role=option] small{font-size:10px;color:var(--subtle)}
.filter-field-options [role=option]:hover,.filter-field-options [aria-selected=true]{background:var(--accent-soft)}
.filter-field-empty{padding:10px 8px;font-size:12px;color:var(--muted)}
.list-source-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center;font-size:12px}
@media(max-width:760px){
  .filter-builder-modal{width:calc(100vw - 20px);padding:13px;max-height:calc(100dvh - 28px)}
  .filter-group{padding:9px}.filter-group-heading{flex-wrap:wrap}
  .filter-condition{position:relative;padding-right:23px;gap:6px;border-top:1px solid var(--line);padding-top:8px}
  .filter-condition>.filter-join-word{width:100%;padding:1px 0}.filter-condition>.filter-connector{margin-right:calc(100% - 68px)}
  .filter-condition>.filter-field-picker{width:100%;flex-basis:100%}
  .filter-condition>.filter-operator,.filter-condition>.filter-value,.filter-condition>textarea{width:45%;min-width:80px}
  .filter-condition>.filter-remove{position:absolute;right:-4px;top:7px}.filter-range{flex-basis:100%}
  .filter-group-row{grid-template-columns:minmax(0,1fr);gap:6px}.filter-group-row>.filter-join-word{padding:2px 0}
  .filter-add-actions,.filter-summary{flex-wrap:wrap}
}
@media(max-width:760px){.sheet-shell{--sheet-gutter:12px;border-radius:4px}.sheet-titlebar{padding:0 8px;height:48px}.sheet-title{gap:8px}.sheet-title h1{font-size:13px}.sheet-titlebar .sheet-list-actions>summary{font-size:11px}.sheet-commandbar{padding:6px 8px;gap:4px}.sheet-view-tools{gap:3px}.sheet-view-tools select{min-width:108px;max-width:130px}.sheet-commandbar .button{font-size:11px;padding:5px 6px}.sheet-view-tools>[data-action=view-modal]{display:none}.sheet-row-count{display:none}.sheet-workspace .spreadsheet .grid-cell-button{min-height:44px;height:44px;padding-top:10px;padding-bottom:10px}.sheet-workspace .grid-row-controls{min-height:44px}.sheet-filter-popover{position:fixed;left:10px;right:10px;top:110px;width:auto}.column-kind-menu{grid-template-columns:1fr}.sheet-selection{padding:5px 8px}.sheet-workspace .table-footer{height:auto;min-height:42px}.grid-cell-run{opacity:1}}
.filter-builder-backdrop{grid-template-columns:minmax(0,1fr)}@media(max-width:760px){.filter-builder-backdrop{padding:10px}}
.column-type-symbol[draggable=true]{cursor:grab;user-select:none;touch-action:none}
.column-type-symbol[draggable=true]:active{cursor:grabbing}
.spreadsheet th.column-drop-target{box-shadow:inset 3px 0 var(--accent,#7355d8)}
.grid-row-controls{display:flex;align-items:center;gap:8px;min-height:36px}.grid-row-controls input{flex-shrink:0;margin:0}.sheet-workspace .spreadsheet input[type=checkbox]{width:24px;height:24px;accent-color:#242424}.button.grid-run-arrow{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;min-height:28px;padding:4px;border:1px solid transparent;border-radius:4px;background:transparent;box-shadow:none;color:var(--muted)}.grid-run-arrow svg{display:block}.grid-run-arrow:hover:not(:disabled){background:var(--accent-soft);border-color:var(--line-strong);color:var(--accent)}.grid-run-arrow:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.grid-run-arrow:disabled{opacity:.35}.sheet-column-heading .column-heading{flex:1;width:auto}.sheet-column-heading{gap:5px}.grid-column-run{margin-right:5px}@media(max-width:760px){.button.grid-run-arrow{width:32px;height:32px;min-height:32px}.grid-row-controls{gap:6px}}
.slash-picker{max-height:260px;overflow:auto;border:1px solid var(--line,#dedbe4);border-radius:8px;background:var(--surface,#fff);box-shadow:0 8px 25px #20143820;margin-top:6px}
.slash-picker[hidden]{display:none}
.slash-picker button{display:flex;align-items:center;gap:12px;border:0;border-bottom:1px solid #eee;background:transparent;color:inherit;text-align:left;width:100%;padding:9px 12px;cursor:pointer}
.slash-picker button[aria-selected=true],.slash-picker button:hover{background:#f0ebff}
.slash-picker small{font-size:10px;color:#695a83;min-width:52px}
.slash-picker p{padding:10px}
.offer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:20px}
.offer-excerpt{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 22px;color:var(--muted,#726b80)}
.offer-card h3{font-size:12px;letter-spacing:.025em}
.ai-response-metrics{display:flex;flex-wrap:wrap;gap:10px 20px;padding:12px 0;margin:0 0 12px;border-bottom:1px solid #e4e5eb;color:#242633}
.ai-response-metrics div{display:grid;gap:3px}.ai-response-metrics dt{font-size:11px;color:#626577}.ai-response-metrics dd{margin:0;font-size:13px;font-weight:600}
.ai-response-answers{display:grid;gap:14px}.ai-response-answer{padding:14px;background:#f8f9fc;border:1px solid #e4e5eb;border-radius:8px;min-width:0}
.ai-response-answer>h3{font-size:14px;margin:0 0 10px;color:#242633}.ai-response-answer .cell-result-meta{display:none}.ai-response-answer .cell-result-value{background:#fff;padding:10px 12px;line-height:1.65}.ai-response-answer .cell-result-explanation{margin:12px 0;font-size:12px}.ai-response-answer .cell-result-explanation h3{margin:0 0 4px;font-size:12px}.ai-response-answer .cell-result-explanation p{margin:0}.ai-response-answer .cell-result-sources{padding-top:9px;margin-bottom:0}.ai-response-json{margin-top:18px}

.prompt-input-row{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding:.65rem 0;border-bottom:1px solid var(--line,#d9e2ef)}
.prompt-input-row code{overflow-wrap:anywhere;font-size:.8em}.prompt-input-row>span:last-child{display:flex;align-items:center;gap:.5rem;white-space:nowrap}

.prompt-input-row input[role=switch]{appearance:none;position:relative;flex:0 0 2.2rem;width:2.2rem;height:1.25rem;min-height:0;margin:0;border:1px solid #98a5bd;border-radius:1rem;background:#dce2ed;cursor:pointer}
.prompt-input-row input[role=switch]::before{content:"";position:absolute;top:2px;left:2px;width:.875rem;height:.875rem;border-radius:50%;background:white;box-shadow:0 1px 3px #0003;transition:transform .12s}
.prompt-input-row input[role=switch]:checked{background:#6555d9;border-color:#6555d9}.prompt-input-row input[role=switch]:checked::before{transform:translateX(.95rem)}
.prompt-input-row input[role=switch]:focus-visible{outline:2px solid #337dff;outline-offset:2px}

/* AI setups own a run; their result columns only display saved answers. */
.sheet-workspace .spreadsheet th.ai-setup-heading{background:#f4f0ff;border-top:3px solid #7355c5;height:57px}
.sheet-workspace .spreadsheet th.ai-result-heading{background:#fff;height:57px}
.ai-setup-heading .column-type-symbol{background:#7455c4;color:#fff;border-radius:5px;padding:4px;font-size:9px;line-height:1}
.ai-result-heading .column-type-symbol{color:#687083;font-size:11px}
.sheet-column-heading .column-label-stack{display:block;min-width:0;overflow:hidden}
.column-label-stack>span{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.sheet-column-heading .column-label-stack small{display:block;font-size:9px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#6c5a95;margin-top:4px}
.ai-result-heading .column-label-stack small{color:#687083}
.ai-run-footer{display:flex;align-items:center;gap:10px;flex-shrink:0;max-width:100%;font-size:11px;color:#646071;margin-right:auto}
.ai-run-footer>span{display:flex;align-items:center;gap:6px;min-width:0}
.ai-run-footer i{width:6px;height:6px;background:#7355c5;border-radius:50%;flex-shrink:0}
.sheet-workspace .table-footer:has(.ai-run-footer){height:auto;min-height:44px;align-items:center;flex-wrap:wrap}
.sheet-workspace .table-footer:has(.ai-run-footer) .table-scroll-dock{flex-basis:100%;order:3;max-width:none;margin:0}
@media(max-width:760px){.ai-run-footer{flex:1 1 100%;justify-content:space-between}.ai-run-footer>span{flex:1;flex-wrap:wrap}}

/* Reviewed enrichment runs: one bounded preflight and a persistent history drawer. */
.ai-preflight-counts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.ai-preflight-counts>div{padding:12px;border:1px solid #e5e7eb;border-radius:8px}.ai-preflight-counts dt{font-size:12px;color:#667085}.ai-preflight-counts dd{margin:4px 0 0;font-size:22px;font-weight:650}.ai-history-run{border-bottom:1px solid #e5e7eb;padding:14px 0}.ai-history-run .ai-run-status{flex-wrap:wrap;padding:10px}.ai-history-run summary{cursor:pointer;overflow-wrap:anywhere}.ai-history-cells{list-style:none;padding:0}.ai-history-cells li{padding:12px 0;border-bottom:1px solid #eee;overflow-wrap:anywhere}.ai-history-cells p{margin:6px 0}.scoped-research-sources{margin-top:20px}.scoped-research-sources blockquote{white-space:pre-wrap;overflow-wrap:anywhere}.ai-run-footer .actions{flex-wrap:wrap;justify-content:flex-end}@media(max-width:600px){.ai-preflight-counts{grid-template-columns:1fr}.ai-run-footer{flex-wrap:wrap}.ai-history-run .ai-run-status{align-items:flex-start}}

.list-filters{margin-bottom:18px;gap:8px;flex-wrap:wrap}.list-overview-stats{display:flex;gap:48px;flex-wrap:wrap;margin-bottom:14px}.list-overview-stats>div{display:grid;gap:5px}.list-overview-stats strong{font-size:24px}.list-overview-stats span{color:var(--muted)}.import-history{margin-top:24px}.import-recovery{margin-top:16px;flex-wrap:wrap}.list-index-actions{flex-wrap:wrap}
.modal-backdrop{z-index:100!important}.sf-select-popup{z-index:130!important}#toast{z-index:200}.sheet-table-tools{position:relative}.sheet-table-tools>summary{cursor:pointer;font-size:12px;padding:8px}.sheet-table-tools>div{position:absolute;top:100%;right:0;z-index:20;display:grid;min-width:230px;padding:8px;background:var(--surface);border:1px solid var(--line);box-shadow:0 8px 24px #0002}.sheet-table-tools .button{text-align:left}.sheet-view-tools{flex-wrap:wrap}.grid-row-details{min-width:18px!important;padding:0!important}.research-row-value{white-space:pre-wrap;overflow-wrap:anywhere}.research-row-field,.crm-match-row,.bulk-source-cell{border:1px solid var(--line);padding:14px;margin:12px 0;border-radius:6px}.research-source{margin:12px 0;overflow-wrap:anywhere}.research-source blockquote{white-space:pre-wrap;border-left:3px solid var(--line-strong);padding-left:12px}.research-metadata-editor{margin:12px 0}.research-metadata-editor summary{cursor:pointer}.research-metadata-editor .form-grid{margin-top:12px}.source-dates{display:block;font-size:11px;overflow-wrap:anywhere}.bulk-source-cell textarea{width:100%;min-height:70px}.bulk-source-review{max-height:65vh;overflow:auto}.research-metadata{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;font-size:12px}.research-metadata dt{color:var(--muted)}.research-metadata dd{margin:0;overflow-wrap:anywhere}@media(max-width:760px){.research-metadata{grid-template-columns:1fr}.sheet-table-tools>div{right:auto;left:0;max-width:calc(100vw - 48px)}}
.research-report-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.research-report summary { cursor: pointer; font-weight: 600; }
.column-origin-badge{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:28px;padding:3px 5px;border-radius:6px;font-size:10px;font-weight:750;line-height:1.2;white-space:nowrap}.column-origin-badge i{width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}.origin-ai{color:#0b7651;background:#e2f4eb}.origin-salesforce{color:#1765a6;background:#e6f0fb}.sheet-column-heading:has(.column-origin-badge)>.column-type-symbol{width:auto;min-width:34px;flex-shrink:0}.result-status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin:0 6px 1px 0;vertical-align:middle;background:#9a9fab;flex:none}.result-status-ready{background:#17805b}.result-status-unknown,.result-status-stale,.result-status-waiting{background:#c08722}.result-status-error{background:#c24d4d}.result-status-running{background:#6660ba}.result-drawer-scope{display:flex;flex-direction:column;gap:5px;padding-bottom:14px;margin-bottom:15px;border-bottom:1px solid #e0e3ea;color:#555d6e;font-size:11px;overflow-wrap:anywhere}.result-drawer-scope strong{color:#242633;font-size:14px}#result-field-search{width:100%;margin:0 0 16px;background:#f6f7fa;color:#242633;border:1px solid #dce0e8;border-radius:7px;padding:9px 11px;font-size:12px}.result-field-card{margin:0 0 12px;padding:12px;border:1px solid #e0e3ea;border-radius:8px;background:#fff}.result-field-card[hidden]{display:none}.result-field-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:9px}.result-field-heading strong{font-size:12px;flex:1}.result-field-heading small{font-size:10px;color:#667085}.result-field-heading .button{color:#5945b3;font-size:11px;white-space:nowrap}.result-field-value{font-size:13px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;max-height:330px;overflow:auto;user-select:text}.result-field-state{display:block;font-size:10px;color:#697183;margin-top:9px;line-height:1.5}.result-extra-fields,.result-original-response,.result-source-details{margin:12px 0 20px;color:#424b5d;font-size:12px}.result-extra-fields>summary,.result-original-response>summary,.result-source-details>summary{cursor:pointer;padding:8px 0;font-weight:650}.result-answer-group{margin-bottom:20px}.result-answer-group>h3,.result-current-fields>h3{font-size:13px;margin:14px 0 10px}.result-crm-scope{padding:12px;margin-bottom:15px;border:1px solid #d8e4f1;background:#f3f7fc;border-radius:8px;overflow-wrap:anywhere;font-size:12px;line-height:1.6}.result-crm-scope p{margin:0 0 6px}.result-crm-scope small{display:block;font-size:10px}.result-crm-scope a{display:block;margin-top:9px;color:#365ba0}#result-field-form .saved-answer-preview article{background:var(--control);padding:11px;border-radius:7px;margin-top:10px}#result-field-form .saved-answer-preview small{display:block;margin-top:5px}#result-field-form .saved-answer-preview p{white-space:pre-wrap;overflow-wrap:anywhere}#result-field-form .status-note{font-size:12px;line-height:1.6}@media(max-width:600px){.result-field-heading{gap:6px}.result-field-heading strong{flex-basis:55%}.result-field-heading .button{padding:5px}.result-field-value{max-height:260px}}
.modal-backdrop:has(#result-field-form){display:flex;justify-content:flex-end;align-items:stretch;padding:0;background:#080a1633}.modal:has(#result-field-form){position:relative;display:flex;flex-direction:column;width:min(620px,100vw);height:100dvh;max-height:100dvh;border-radius:0;padding:24px;overflow:hidden;--surface:#fff;--control:#f6f7fa;--ink:#242633;--muted:#555d6e;--line:#e0e3ea;--accent:#5843bb;--neutral-soft:#f0f1f6;color:var(--ink);background:var(--surface);color-scheme:light}.modal:has(#result-field-form)>h2{padding-right:36px;font-size:20px}.modal:has(#result-field-form)>.subtext{font-size:12px;margin-bottom:16px}#result-field-form{min-height:0;overflow-y:auto;overscroll-behavior:contain;flex:1}#result-field-form>.actions{position:sticky;bottom:0;background:#fff;padding:14px 0;margin:14px 0 0;border-top:1px solid #e0e3ea}.grid-cell-button .result-cell-line>.result-status-dot{display:inline-block;width:8px;height:8px;margin-right:6px;vertical-align:middle}.grid-cell-button .result-cell-line>span:not(.result-status-dot){display:inline}
.result-status-gated{background:#9a804f}

/* Table flow: readable grid, stable ordinals and a synthetic creation column. */
.sheet-workspace .spreadsheet th,.sheet-workspace .spreadsheet td{border-right:1px solid #cdd1dc;border-bottom:1px solid #cdd1dc}
.sheet-workspace .spreadsheet[data-table-mode=analysis] .grid-selector{width:124px!important;min-width:124px!important;max-width:124px!important;padding:0 6px!important}
.spreadsheet .grid-row-number{display:inline-block;min-width:25px;margin-right:3px;text-align:right;font:11px ui-monospace,monospace;color:#676d7c;flex-shrink:0;font-variant-numeric:tabular-nums}
.spreadsheet th.grid-selector .grid-row-number{margin-right:9px}
.grid-add-column,.grid-add-cell{width:160px!important;min-width:160px!important;max-width:160px!important;background:#fafbfe!important}
.grid-add-column .button{white-space:nowrap}.grid-add-cell{border-right:0!important}
.sheet-workspace .spreadsheet th.ai-setup-heading{height:100px;vertical-align:top;padding-top:5px!important;padding-bottom:6px!important}
.ai-column-actions{display:flex;align-items:center;justify-content:space-between;gap:3px;margin-top:2px}
.ai-column-actions .button{font-size:10px;min-height:24px;padding:3px 4px;white-space:nowrap}
.ai-column-actions small{font-size:9px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#666078}
.ai-column-progress{font-size:9px;line-height:1.4;color:#58516f;min-height:3px}
.ai-column-progress progress{display:block;width:100%;height:4px;margin:3px 0;accent-color:#7854ce}
.ai-column-progress>span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.column-panel .column-kind-menu{grid-template-columns:1fr}.column-kind-choice[hidden]{display:none!important}
.column-panel form>.actions{z-index:5;gap:8px;box-shadow:0 -5px 10px #ffffffc0;flex-wrap:wrap}
.column-panel .column-back{margin-right:auto;font-size:12px}.column-panel .column-back:focus-visible{outline:2px solid var(--accent)}
.column-panel .column-kind-choice{min-height:74px}.column-panel .column-template-tools{margin-bottom:16px}
@media(max-width:760px){.grid-row-controls{gap:3px}.spreadsheet .grid-row-number{min-width:23px;font-size:10px}.sheet-workspace .spreadsheet th.ai-setup-heading{height:104px}}

.spreadsheet .grid-selector{width:104px!important;min-width:104px!important;max-width:104px!important}.sheet-workspace .grid-row-controls{gap:3px}
