/* Workspace modes, curve management and KAS use the shared instrument-panel tokens. */
.workspace-modes { display: flex; align-items: stretch; gap: 0; margin: 0 -12px 9px; padding: 0 12px; border-bottom: 1px solid #bbc8d7; background: #dae2ec; }
.workspace-modes button { background: none; border: 0; border-right: 1px solid #c1cede; border-bottom: 2px solid transparent; border-radius: 0; padding: 11px 17px 9px; color: #455c77; font-size: 11px; }
.workspace-modes button:first-child { border-left: 1px solid #c1cede; }
.workspace-modes button[aria-pressed=true] { background: #f9fbfe; color: #174e7d; border-bottom-color: #2b75b5; font-weight: 650; }
.workspace-modes button:hover { background: #edf3fb; }
.workspace-modes button span { display: inline-block; min-width: 17px; padding: 1px 4px; margin-left: 5px; font: 9px var(--mono); border-radius: 2px; background: #cfdded; color: #385673; }
.project-toolbar { display: flex; align-items: center; gap: 13px; margin-left: auto; }
.project-open { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.project-open input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.project-open:focus-within { outline: 2px solid #95c9ff; outline-offset: 2px; }
#project-status, #kinetics-status { font-size: 11px; line-height: 1.7; color: var(--muted); }
#project-status:empty { display: none; }
#project-status { margin: 8px 0; padding: 7px 9px; background: #f3f7fc; border-left: 2px solid #6089b1; }
.sensitivity-panel, .compare-selection, .comparison-table-panel, .compatibility-panel, .kinetics-panel { padding: 14px; margin-top: 9px; }
.sensitivity-panel { background: #f6f8fb; }.sensitivity-panel .section-heading { align-items: start; }.sensitivity-panel .quiet { margin-bottom: 0; }
.compare-selection { margin-top: 0; border: 0; border-top: 1px solid var(--line); }
#compare-set-panel { border: 1px solid var(--line); background: #f4f7fb; margin: 0 0 9px; }
#compare-set-panel > summary { margin: 0; padding: 9px 12px; font-size: 11px; font-weight: 600; color: #365a7d; }
#compare-set-panel > summary > span { float: right; font: 10px var(--mono); color: #536e8a; }.compare-selection > .quiet { margin-block: 6px 9px; }
.count-badge, .research-tag { font: 10px var(--mono); color: #446180; background: #edf3fa; border: 1px solid #c9d7e7; padding: 4px 7px; border-radius: 2px; white-space: nowrap; }
#series-picker { border: 1px solid #cbd7e4; background: #f4f7fb; margin-top: 10px; padding: 0 10px 10px; }
#series-picker > summary { margin-top: 6px; font-size: 11px; font-weight: 600; }
#series-picker:not([open]) { padding-bottom: 4px; }
#picker-source { margin-top: 5px; font-size: 10px; }
.picker-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; max-height: 180px; overflow: auto; background: #fff; border: 1px solid #d5dfea; margin: 8px 0; }
.picker-options label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 10px; line-height: 1.5; padding: 8px; border-bottom: 1px solid #e0e7f0; }
.picker-options label:hover { background: #ecf3fb; }.picker-options label:has(input:checked) { background: #dfecfb; color: #194f7e; }
.picker-options input, .compare-legend input { flex-shrink: 0; accent-color: #2672b1; }
.comparison-items { display: block; overflow: auto; max-height: 280px; margin: 10px 0; border: 1px solid var(--line); }
.curve-set-table { width: 100%; }.curve-set-table thead th { z-index: 1; }
.curve-set-table td { font-size: 10px; padding: 7px 9px; }
.curve-set-table .curve-label { position: static; background: transparent; min-width: 180px; max-width: 330px; white-space: normal; font-size: 10px; font-weight: 550; line-height: 1.5; color: var(--ink); }
.curve-index { width: 35px; text-align: center; }
.curve-color { display: inline-block; width: 7px; height: 7px; margin-right: 5px; vertical-align: middle; border-radius: 0; }
.curve-source { display: block; font-size: 10px; color: #536982; line-height: 1.5; max-width: 300px; white-space: normal; }
.curve-row-range { display: block; font: 9px/1.7 var(--mono); color: #596d84; margin-top: 3px; white-space: normal; }
.curve-remove-cell { width: 45px; text-align: center; }
.remove-series { border: 1px solid transparent; background: transparent; color: #576d85; font-size: 18px; line-height: 1; padding: 3px 7px; }
.remove-series:hover { border-color: #d4ae9b; background: #faeee7; color: #914322; }.curve-set-empty { padding: 15px !important; font-size: 11px !important; color: var(--muted); white-space: normal; }
.compare-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 13px; padding-top: 9px; border-top: 1px solid var(--line); }
.compare-controls label, .zoom-controls label { display: flex; flex-direction: column; gap: 5px; font-size: 10px; color: #536982; }
.compare-controls input { width: 180px; }.compare-controls select { min-width: 160px; }.compare-controls .primary-button { margin-left: auto; }
#compare-status, #sensitivity-status { margin-top: 9px; font-size: 11px; color: var(--muted); line-height: 1.7; }
#compare-status:empty, #sensitivity-status:empty { display: none; }
.research-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); background: #f4f7fb; margin: 9px 0; }
.sensitivity-panel .research-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
.research-stat { display: flex; flex-direction: column; gap: 5px; border-right: 1px solid var(--line); padding: 10px 13px; }.research-stat:last-child { border-right: 0; }
.research-stat > span { color: #526985; font-size: 10px; }.research-stat > strong { font: 550 15px var(--mono); color: #233d5b; }.research-stat > small { color: #596c83; font-size: 9px; line-height: 1.6; }
.compare-chart-panel { padding: 13px; border-color: #b7c7d9; }
.compare-chart-panel .section-heading { align-items: center; }.compare-chart-panel .quiet { font-size: 10px; margin: 5px 0 7px; }.compare-chart-panel .chart-tools select { font-size: 11px; }
.comparison-plot-grid { display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 12px; margin-top: 10px; }
.curve-inspector { border-left: 1px solid #d3ddea; padding-left: 12px; background: #fafbfd; }
.curve-inspector h3 { font-size: 10px; font-weight: 600; color: #506b89; margin: 10px 0 8px; }
.compare-legend { display: flex; flex-direction: column; gap: 0; }
.compare-legend label { display: flex; align-items: start; gap: 6px; padding: 9px 0; font-size: 10px; line-height: 1.6; cursor: pointer; border-bottom: 1px solid #e1e7ef; }
.compare-legend label input { margin-top: 2px; }.compare-legend label i { margin-top: 7px; }
/* Long unbroken labels (sheet or file names) wrap instead of widening the page. */
.compare-legend label span, #compare-source-notes p, #compare-source-notes h3 { overflow-wrap: anywhere; min-width: 0; }
.compare-legend label:has(input:not(:checked)) { color: #5b6c81; text-decoration: line-through; text-decoration-color: #8997a9; }
.compare-legend i, #compare-tooltip i { height: 2px; width: 16px; flex-shrink: 0; display: inline-block; }
.compare-chart-wrap { position: relative; }#compare-chart { display: block; width: 100%; height: auto; font-family: inherit; }
#compare-tooltip { position: absolute; pointer-events: none; max-width: 95%; background: #22364e; border: 1px solid #172d46; color: #fff; padding: 8px 10px; font: 10px/1.9 var(--mono); border-radius: 2px; }#compare-tooltip i { margin-right: 5px; }
.zoom-controls { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line); }.zoom-controls input { width: 125px; }
.compatibility-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.compatibility-item { padding: 10px; border: 1px solid #cbd8e4; border-left: 2px solid #7097bb; background: #f6f9fc; }
.compatibility-item.reported-difference { border-left-color: #bb8c44; background: #fdfaf2; }
.compatibility-item > span { font-size: 10px; color: #526985; }.compatibility-item > strong { display: block; margin: 7px 0; font-size: 10px; line-height: 1.6; }.compatibility-item > small { font-size: 9px; line-height: 1.6; color: #536880; overflow-wrap: anywhere; }
#compare-warnings, #compare-source-notes ul { font-size: 11px; line-height: 1.7; color: #50647c; padding-left: 20px; }#compare-warnings li { margin-bottom: 5px; }#compare-source-notes h3 { font-size: 12px; margin-top: 20px; }
.comparison-table-panel th[scope=row] { position: static; min-width: 180px; width: 200px; max-width: 240px; white-space: normal; color: var(--ink); }.comparison-table-panel .table-scroll { max-height: 420px; }
#sensitivity-table th[scope=row] { position: static; }
#sensitivity-table table { min-width: 1040px; table-layout: fixed; }
#sensitivity-table th { white-space: normal; }
#sensitivity-table th:last-child, #sensitivity-table td:last-child { width: 32%; white-space: normal; overflow-wrap: anywhere; vertical-align: top; line-height: 1.6; }
#sensitivity-table td:last-child small { display: block; margin-top: 4px; color: #536881; }
#sensitivity-table details ul { padding-left: 18px; margin: 6px 0; }
.compare-export-bar { display: flex; align-items: center; gap: 10px; padding: 12px 0; margin-top: 10px; border-top: 1px solid var(--line); }
.compare-export-bar > span { font-size: 10px; line-height: 1.6; color: var(--muted); margin-right: auto; }
.kinetics-panel .section-heading .eyebrow, .kinetics-panel > .eyebrow { font: 10px var(--mono); color: #45688b; margin-bottom: 6px; }
.kinetics-example { border-left: 2px solid #789abd; background: #edf3fa; color: #365778; padding: 9px 12px; margin: 12px 0; font-size: 11px; line-height: 1.7; }
.kinetics-review { display: grid; gap: 0; margin: 12px 0; border: 1px solid #cbd7e4; }
.kinetics-review label { display: flex; align-items: start; gap: 9px; padding: 10px 12px; font-size: 11px; line-height: 1.7; border-bottom: 1px solid #d9e2ec; background: #f7f9fc; cursor: pointer; }.kinetics-review label:last-child { border-bottom: 0; }.kinetics-review label:has(input:checked) { background: #e5f0fc; }
.kinetics-review input { accent-color: #2672b1; margin-top: 3px; flex-shrink: 0; }
#kinetics-runs th[scope=row] { position: static; min-width: 220px; max-width: 340px; white-space: normal; }#kinetics-runs small { display: block; font-size: 9px; color: #536881; font-weight: 400; line-height: 1.7; margin-top: 4px; }#kinetics-runs input { width: 100px; }
#kinetics-energy-chart, #kinetics-fit-chart { display: block; width: 100%; height: auto; margin: 15px 0; }
#kinetics-warnings { font-size: 11px; line-height: 1.8; color: #50647c; }#kinetics-sources { line-height: 1.8; }.kinetics-panel .table-scroll { max-height: 390px; }.kinetics-panel th[scope=row] { position: static; }.kinetics-panel .section-heading label { font-size: 10px; color: #536982; }
.research-error { color: #8e3d1b !important; background: #fff0e9 !important; border: 1px solid #e3bda9 !important; padding: 8px 10px; }
@media(min-width:1450px) { .workspace-modes { margin-inline: -16px; padding-inline: 16px; } }
@media(max-width:1150px) { .compatibility-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.compare-export-bar { flex-wrap: wrap; }.compare-export-bar > span { flex-basis: 100%; }.compare-chart-panel .section-heading { flex-wrap: wrap; } }
@media(max-width:950px) { .comparison-plot-grid { grid-template-columns: minmax(0,1fr); }.curve-inspector { border-left: 0; border-top: 1px solid var(--line); padding: 0; }.compare-legend { flex-direction: row; flex-wrap: wrap; gap: 0 12px; }.compare-legend label { max-width: 260px; } .compare-controls .primary-button { margin-left: 0; }.section-heading { flex-wrap: wrap; }.workspace-modes button { padding-inline: 13px; } }
@media(max-width:720px) {
  .workspace-modes { margin-inline: -8px; padding-inline: 0; justify-content: stretch; }.workspace-modes button { flex: 1; padding: 11px 5px; font-size: 10px; }.workspace-modes button span { font-size: 9px; padding-inline: 3px; margin-left: 2px; }
  .project-toolbar { margin-left: 0; gap: 8px; }.project-toolbar .text-button, .project-toolbar .small-button { font-size: 10px; }
  .sensitivity-panel, .compare-selection, .comparison-table-panel, .compatibility-panel, .kinetics-panel, .compare-chart-panel { padding: 12px; }.section-heading { gap: 9px; }
  .picker-options { grid-template-columns: 1fr; }.picker-options label { font-size: 11px; padding: 9px; }
  .compare-controls { gap: 11px; }.compare-controls label, .compare-controls input, .compare-controls select { width: 100%; }.compare-controls select, .compare-controls input { padding: 8px; }
  .research-stats, .sensitivity-panel .research-stats { grid-template-columns: 1fr; }.research-stat { border-right: 0; border-bottom: 1px solid var(--line); }.research-stat:last-child { border-bottom: 0; }
  .compare-chart-panel .chart-tools { flex-wrap: wrap; }.compare-chart-panel .chart-tools select { max-width: 215px; }.compare-legend label { font-size: 9px; padding-block: 6px; }
  .zoom-controls input { width: 125px; }.compatibility-grid { gap: 7px; }.compatibility-item { padding: 9px; }
  .kinetics-panel .zoom-controls label, .kinetics-panel .zoom-controls input { width: 100%; }.research-tag { white-space: normal; }
}
/* 0.3.4: grouped comparison warnings keep the list typography; sections replace the flat list. */
#compare-warnings { padding-left: 0; }
#compare-warnings .warning-group ul, #compare-source-notes .warning-group ul { margin: 0; padding-left: 20px; }
