/* One working plan; optional sources never take a permanent column. */
[hidden]{display:none!important}
.container{max-width:1380px}
.site-header .site-nav{overflow-x:auto!important;scrollbar-width:thin}
.hero{padding:20px 24px;box-shadow:none}
.hero h1{font-size:26px}
#dataset-selection-panel{padding:16px 20px;margin-bottom:8px}
#data-controls-panel{overflow:visible;max-height:none!important;opacity:1!important;pointer-events:auto}
#data-controls-panel>.field{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:8px 14px;align-items:end}
#data-controls-panel>.field>label,#dataset-confirm-status{grid-column:1/-1}
#analysis-dataset{width:100%;min-width:0;max-width:100%}
#dataset-profile-area>button{width:auto!important}
.workspace-status{margin:8px 4px;color:#475569;font-size:13px;overflow-wrap:anywhere}
.workspace-storage{margin:8px 0 18px;padding:10px 16px;border:1px solid #dbe3ed;border-radius:10px;background:#fff}
.workspace-storage>summary,.calculation-settings>summary,#ai-settings>summary{cursor:pointer;font-weight:650;color:#334155;padding:6px}
#workspace-controls{border:0;margin:8px 0 0;padding:0!important}
.configurator-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px;min-height:0;align-items:start}
.configurator-main{min-width:0;padding:0}
.workspace-actions{padding:18px 20px}
.analysis-actions{display:flex;flex-wrap:wrap;gap:10px}
.analysis-actions button{min-height:44px;white-space:normal}
.btn:disabled{cursor:not-allowed;background:#e2e8f0;color:#475569;opacity:1}
.btn:focus-visible,summary:focus-visible,.text-action:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
.workspace-secondary{display:flex;gap:16px;flex-wrap:wrap}
.text-action{border:0;background:none;padding:5px 0;color:#1d4ed8;cursor:pointer;font:inherit;font-size:13px;text-decoration:underline;text-underline-offset:3px}
.calculation-settings{margin-bottom:16px;border:1px solid #dbe3ed;border-radius:12px;background:#fff;padding:8px 12px}
.calculation-settings .panel{border:0;margin:10px 0 0;padding:10px}
.receipt-panel{position:sticky;top:84px;width:auto;min-width:0;height:auto;max-height:calc(100vh - 100px);padding:16px;box-sizing:border-box}
.receipt-panel-body{overflow:auto;min-height:0}
.receipt-panel .panel{border:0;border-radius:0;padding:8px 0;margin:0}
.receipt-panel h4{font-size:15px}
.receipt-panel .ai-report-fields{display:block}
.receipt-panel .ai-report-field{margin-top:10px}
.receipt-panel .ai-report-field select{width:100%}
.receipt-panel .ai-report-toggle{padding:10px;margin-top:10px}
.receipt-panel .ai-report-head{display:none}
.receipt-panel .toolbar{margin:0}
.receipt-launch{padding-top:10px;overflow:auto;flex-shrink:0;max-height:45vh}
.receipt-launch>.btn,.receipt-launch .toolbar>.btn{width:100%}
.receipt-launch h3{font-size:14px;margin:12px 0}
.receipt-launch #analysis-status{overflow-wrap:anywhere}
.receipt-panel.collapsed{width:100%!important;min-width:0!important}
.configurator-layout:has(.receipt-panel.collapsed){grid-template-columns:minmax(0,1fr) 136px}
#ai-settings{border-top:1px solid #e2e8f0;margin-top:12px;padding-top:8px}
#ai-settings summary{font-size:13px}
.cards-grid .fixed-card{display:none}
.cards-grid .card-price-tag{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.workspace-empty{border:1px dashed #cbd5e1;padding:28px 20px;border-radius:12px;color:#475569;line-height:1.6}
.workspace-dialog{box-sizing:border-box;width:min(920px,calc(100vw - 24px));max-height:90vh;overflow:auto;border:1px solid #cbd5e1;border-radius:16px;padding:20px;color:#0f172a;box-shadow:0 20px 80px #0f172a44}
.workspace-dialog::backdrop{background:#0f172a88}
.workspace-dialog-head{display:flex;gap:16px;align-items:center;justify-content:space-between;margin-bottom:12px}
.workspace-dialog-head h2{margin:0;font-size:22px}
.workspace-dialog .panel{border:0;padding:0;margin:0}
.source-panel{width:auto;min-width:0}
.source-panel .sidebar-tree{max-height:60vh;overflow:auto}
.source-panel .sidebar-search{box-sizing:border-box;width:100%}
.start-choices{display:grid;gap:12px;margin:20px 0}
.start-choices label{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #cbd5e1;border-radius:10px;cursor:pointer;line-height:1.4}
.start-choices input{width:20px;height:20px;flex-shrink:0}
#start-error,#overview-dialog-status{color:#b91c1c;line-height:1.5}
#help-route{background:#eff6ff;border-radius:10px;padding:12px;margin-top:12px;line-height:1.5}
#help-route button{margin:6px 8px 0 0}
@media(max-width:980px){.configurator-layout,.configurator-layout:has(.receipt-panel.collapsed){grid-template-columns:minmax(0,1fr)}.receipt-panel{position:static;max-height:none;width:100%;height:auto}.receipt-launch{max-height:none}.receipt-panel-body{overflow:visible}.receipt-panel.collapsed .col-header{justify-content:flex-start}.receipt-panel.collapsed .collapsed-summary{margin-right:auto}}
@media(max-width:560px){.container{padding:0 10px 24px}.hero{padding:16px}.hero h1{font-size:23px}.analysis-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.analysis-actions .btn{padding:10px;font-size:13px}.workspace-actions,#dataset-selection-panel{padding:14px}#data-controls-panel>.field{grid-template-columns:minmax(0,1fr)}#dataset-confirm{width:100%}.workspace-dialog{padding:14px}.workspace-dialog-head{align-items:flex-start}.workspace-dialog .descriptive-mode-head{display:block}#workspace-controls>select{width:100%}.legend-settings-grid{grid-template-columns:1fr}}

/* Hypotheses occupy normal document flow; siblings never shrink or overlap. */
.plan-group{width:100%;box-sizing:border-box;border:1px solid #dbe3ed;border-radius:12px;padding:16px;min-width:0;flex:none;scroll-margin-top:100px}
.plan-hypothesis{background:#fff8ef;border-color:#edd2ae}
.plan-overview{background:#f2f7ff;border-color:#cbdcf5}
.plan-orphan{background:#fff7ed;border-color:#fdba74}
.plan-group-head{display:flex;flex-direction:column;gap:12px;min-width:0}
.plan-group-title{font-size:15px;line-height:1.55;font-weight:650;color:#334155;margin:0;white-space:normal;overflow-wrap:anywhere}
.plan-group-actions,.plan-card-actions,.plan-child-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.plan-group-actions .btn{font-size:12px;padding:8px 12px;min-height:38px}
.plan-delete{color:#9f3424}
.plan-chevron{display:inline-block;transition:transform .15s}
[data-plan-toggle][aria-expanded=true] .plan-chevron{transform:rotate(180deg)}
.plan-group-children{display:flex;flex-direction:column;gap:12px;padding-top:16px;overflow:visible;max-height:none}
.plan-group-children>.analysis-card{background:#ffffffc9}
.plan-group-status{font-size:13px;color:#92400e;margin:12px 0 0;line-height:1.5}
.plan-error{color:#b91c1c}
.plan-disabled{opacity:.7}
.plan-sources{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.plan-child-controls{margin:10px 0 6px}
.plan-group .plan-child-controls .btn:disabled,.plan-group .plan-child-controls .btn:disabled:hover{background:#e2e8f0!important;color:#475569!important;opacity:1!important;cursor:not-allowed!important;font-size:11px;padding:7px 10px}
.plan-group .plan-preview{display:flex!important;width:fit-content;margin-top:12px;font-size:12px}
#cards-analysis-panel .editor-readonly{line-height:1.6}
@media(max-width:560px){.plan-group{padding:12px}.plan-group-actions{gap:7px}.plan-group-actions .btn{flex:1 1 130px;font-size:11px}.plan-child-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.plan-child-controls button{white-space:normal}.plan-group-children .analysis-card{padding:12px}.plan-group-title{font-size:14px}}

/* II.3: all local selection paths share the transactional editor. */
#analysis-editor-overlay .catalog-toolbar { position:static; padding:0; }
#analysis-editor-overlay .module-catalog-list { max-height:none; overflow:visible; padding:12px 0; }
#analysis-editor-overlay #catalog-assistant-button,
#analysis-editor-overlay .catalog-tabs,
#analysis-editor-overlay .rec-wizard-footer>button:not(#assistant-preview-btn) { display:none; }
#analysis-editor-overlay .rec-wizard-footer { border:0; padding:12px 0; }
#analysis-editor-overlay [data-task-step][hidden] { display:none; }
#analysis-editor-overlay .catalog-search { min-width:0; width:100%; box-sizing:border-box; }
#analysis-editor-overlay #editor-navigation { border-bottom:1px solid #e2e8f0; padding-bottom:12px; }
#analysis-editor-overlay #editor-content>div:first-of-type { max-height:none!important; overflow:visible!important; padding:0!important; }
#analysis-editor-overlay input, #analysis-editor-overlay select, #analysis-editor-overlay textarea { max-width:100%; }
#analysis-editor-overlay .editor-section { overflow-wrap:anywhere; }

/* Hypothesis entry paths share sources, wording and the same review. */
.editor-entry-paths{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
#editor-expert-templates{margin:16px 0;padding:12px;border:1px solid #dbe3ed;border-radius:10px}
#editor-expert-templates summary,.editor-body details>summary{cursor:pointer;font-weight:650}
#editor-live-sentence{line-height:1.65;overflow-wrap:anywhere;white-space:pre-wrap}
.editor-body .editor-section h4{margin:0 0 12px}
.editor-body fieldset{min-width:0}
@media(max-width:560px){.editor-entry-paths .btn{width:100%;white-space:normal}.editor-graph-row header{flex-wrap:wrap}.editor-body label{overflow-wrap:anywhere}}

/* The overview is a local draft with explicit description and exploration. */
.overview-exploration{background:#fff8ef;border:1px solid #edd2ae;border-radius:10px;padding:14px;margin:16px 0;line-height:1.55}
.overview-exploration label{display:flex;gap:10px;align-items:flex-start;margin:10px 0}
.overview-exploration h3,.overview-exploration h4{margin:0 0 10px}
#overview-dialog .descriptive-detail-wrap{padding:14px;margin:16px 0}
#overview-dialog select{max-width:100%;box-sizing:border-box}
#overview-dialog .descriptive-summary{overflow-wrap:anywhere}
#overview-dialog .descriptive-summary-row{gap:16px}
#overview-dialog .descriptive-summary-row b{text-align:right;max-width:60%}
.overview-working{border-left:4px solid #2563eb;padding:12px;animation:editor-pulse 1s infinite alternate}
@media(max-width:560px){#overview-dialog .descriptive-goals{grid-template-columns:1fr}#overview-dialog .descriptive-wizard-actions{flex-wrap:wrap}#overview-dialog .descriptive-wizard-actions .btn{width:100%;white-space:normal}#overview-dialog .descriptive-detail-row{flex-wrap:wrap}.overview-exploration{padding:12px}}

/* The navigator shares the existing editors and never becomes a billable task. */
.start-choices label{align-items:flex-start;line-height:1.5}
.start-choices input{flex:0 0 auto;margin-top:4px}
.help-steps{display:flex;flex-wrap:wrap;gap:8px 24px;padding-left:20px;margin:8px 0}
.help-steps li{padding-right:8px;max-width:100%;overflow-wrap:anywhere}
.help-steps [aria-current=step]{font-weight:800;color:#1e40af}
.help-route-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.help-editor-route{flex:0 0 auto;background:#eff6ff;padding:10px 20px;border-bottom:1px solid #dbeafe;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.help-editor-route p{margin:5px 0}
.help-editor-route b{display:none}
#start-error:empty{display:none}
#start-error{color:#b91c1c}
#help-route p{margin:7px 0;overflow-wrap:anywhere}
@media(max-width:650px){.help-editor-route{padding:8px 12px;max-height:24vh;overflow-y:auto}.help-route-actions{align-items:stretch}.help-route-actions button{max-width:100%;white-space:normal;text-align:left}.help-steps{display:block}.help-steps li{margin:5px 0}}

.help-editor-route .text-action{min-height:32px;padding:5px 6px;border-radius:6px}
