/* Shared Setup and saved-fit workspace. Preserve the desktop arrangement;
   narrower browser viewports scroll the page horizontally. */
:root {
  --cf-ink: #17212c; --cf-muted: #465361; --cf-surface: #fff;
  --cf-base: #d9dee4; --cf-tint: #eef1f4; --cf-line: #a4afbb;
  --cf-blue: #155eb0; --cf-wash: #edf4fc; --cf-lock: #f2f5f8;
  --cf-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.4 5.7 10 11 4.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html, body { min-width: 1440px; font-weight: 500; background: var(--cf-base); color: var(--cf-ink); }
#wrap { width: calc(100% - 32px); max-width: 1600px; margin: 0 auto; background: transparent; }
#wrap *, #wrap *::before, #wrap *::after { box-sizing: border-box; }
#header { background: transparent; width: calc(100% - 32px); max-width: 1600px; margin: 0 auto; padding: 8px 0 9px; }
#header .cf-brand { display: flex; align-items: center; gap: 16px; color: inherit; text-decoration: none; }
#header .cf-wordmark { font-size: 26px; font-weight: 800; letter-spacing: -1px; color: var(--cf-blue); }
#header h1 { margin: 0; padding-left: 16px; border-left: 2px solid var(--cf-line); font-size: 23px; font-weight: 700; }
#cf-toolbar { display: flex; align-items: end; gap: 12px; min-width: 0; }
#cf-page-actions { display: flex; align-items: center; gap: 6px; padding-bottom: 5px; flex-shrink: 0; }
#cf-page-actions .buttonlink { float: none; margin: 0; display: flex; }
#cf-page-actions .feedback-cta { order: -1; }
#wrap #cf-page-actions .resetbutton { display: inline-flex; align-items: center; justify-content: center; height: 34px; min-height: 34px; margin: 0; padding: 4px 13px; border-color: #7d8997; color: var(--cf-ink); font-size: 13px; line-height: 20px; font-weight: 600; }
#cf-page-actions #walkthrough-open { width: auto; min-width: 118px; }
#wrap #cf-page-actions #feedback-open { color: white; background: var(--cf-blue); border-color: #10519a; }
#wrap .resetbutton, #wrap .sesbutton, #wrap .csvbutton, #wrap .addrembutton,
#wrap button, #wrap input[type=submit] { font-family: var(--cf-ui-font); font-size: 13px; font-weight: 600; border: 1.5px solid var(--cf-line); border-radius: 5px; background: var(--cf-surface); color: var(--cf-ink); padding: 6px 11px; box-shadow: none; text-shadow: none; cursor: pointer; }
#wrap button:hover:not(:disabled), #wrap .resetbutton:hover, #wrap .sesbutton:hover, #wrap .csvbutton:hover { background: var(--cf-wash); border-color: var(--cf-blue); }
#wrap button:disabled, #wrap input:disabled { cursor: default; }
#wrap [hidden] { display: none !important; }
#start { display: block; padding: 0; margin: 0; }
#cf-app-frame { display: grid; grid-template-columns: minmax(0,30fr) minmax(0,70fr); gap: 10px; padding: 8px; border: 2px solid #7d8997; background: #edf0f3; }
#cf-tabbar { flex: 1; min-width: 0; margin: 0; height: 39px; padding: 3px 0 0; gap: 4px; background: transparent; overflow-x: auto; }
#wrap .cf-tab { position: relative; display: inline-flex; align-items: baseline; gap: 4px; height: 36px; border-radius: 6px 6px 0 0; border-bottom: none; padding: 6.5px 14px; font-size: 14px; color: var(--cf-muted); background: var(--cf-base); font-weight: 700; }
#wrap .cf-tab-on { color: var(--cf-blue); background: var(--cf-surface); }
#wrap .cf-tab-setup.cf-tab-on, #wrap .cf-tab-setup.cf-tab-on:hover:not(:disabled) { color: #fff; background: var(--cf-blue); border-color: #10519a; }
#wrap .cf-tab-warn { color: #865316; }
#dataholder, #optionsholder { float: none; width: auto; height: auto; min-width: 0; padding: 0; border: 0; background: transparent; }
#dataholder { position: relative; border: 1px solid var(--cf-line); border-radius: 7px; background: var(--cf-surface); overflow: hidden; min-height: 741px; text-align: left; }
#datatable, #cf-fit-data, .datatable { width: 100%; height: 100%; border: 0; font-size: 14px; }
#datatable, #cf-fit-data { position: absolute; inset: 0; }
#dataholder.cf-table-locked { background: var(--cf-tint); }
#dataholder.cf-table-locked #datatable { opacity: 1; filter: none; }
#dataholder .cf-grid-table td, #dataholder .cf-grid-table th { color: var(--cf-ink); }
#dataholder .cf-grid-table td.cf-cell-dimmed { background: #ededed; color: #666 !important; }
#dataholder .cf-grid-table td.cf-uncertainty-inactive { background: #ededed; color: #666; }
#dataholder .cf-grid-table th.cf-uncertainty-inactive { background: #e2e2e2; color: #666; }
#dataholder .cf-grid-table td.cf-grid-selected { background: #d6e7ff; color: var(--cf-ink) !important; }
#dataholder .cf-grid-table td.cf-cell-error { background: #ffd9d9; }
#wrap .cf-plot-frame { position: relative; }
#cf-plotbar { position: absolute; z-index: 5; right: 8px; top: 38px; width: auto; height: auto; border: 0; background: transparent; }
#quickplot, #container, #cf-plotbox { width: 100%; height: 320px; float: none; background: var(--cf-surface); }
#quickplot, #cf-plotbox { border: 1px solid var(--cf-line); border-radius: 5px; }
#cf-fitview, #cf-prevview { width: 100%; min-height: 741px; float: none; }
#cf-prevview { border-color: var(--cf-line); border-radius: 7px; }
#wrap .cf-plot-caption { text-transform: none; letter-spacing: normal; font-weight: 400; }
#bottomholder, #cf-result.cf-controls { width: 100%; min-height: 411px; height: auto; margin: 10px 0 0; padding: 0; float: none; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.08fr) 174px; background: var(--cf-surface); border: 1px solid var(--cf-line); border-radius: 7px; }
#fittingleft, #fittingright { float: none; width: auto; height: auto; margin: 0; border: 0; }
#wrap .cf-settings { display: grid; grid-template-rows: minmax(124px,auto) minmax(116px,auto) minmax(144px,auto); min-width: 0; }
#wrap .cf-control-section { padding: 11px 10px; border-bottom: 1px solid var(--cf-line); min-width: 0; }
#wrap .cf-control-section:last-child { border-bottom: 0; }
#wrap .cf-section-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
#wrap .cf-panel-head { padding: 7px 10px; height: 34px; min-height: 34px; border-bottom: 1px solid var(--cf-line); display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--cf-surface); }
#wrap .cf-panel-head h2, #wrap .cf-panel-head h3, #wrap .cf-control-section h3, #wrap .cf-evaluator h3 { font-size: 13px; line-height: 18px; letter-spacing: .7px; text-transform: uppercase; font-weight: 700; color: #263442; margin: 0; }
#wrap .cf-controls input[type=text], #wrap .cf-controls select, #wrap .cf-controls textarea { min-width: 0; width: 100%; margin: 0; min-height: 29px; height: auto; padding: 4px 7px; border: 1px solid var(--cf-line); border-radius: 4px; background: var(--cf-surface); color: var(--cf-ink); font-size: 13px; font-weight: 550; box-shadow: none; }
#wrap .cf-controls input:disabled, #wrap .cf-controls input[readonly], #wrap .cf-controls select:disabled { opacity: 1; background: var(--cf-lock); color: var(--cf-muted); }
#wrap .cf-controls select { font-family: var(--cf-ui-font); }
#wrap .funceqn { width: 100%; height: auto; min-height: 44px; padding-top: 8px; font-size: 21px; overflow-wrap: anywhere; }
#wrap .cf-settings > .cf-control-section:first-child { display: flex; flex-direction: column; }
#wrap .funceqn:not(.custom), #wrap .cf-settings .cf-res-eq { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px 0; min-height: 58px; }
#wrap .cf-static-math { display: inline-flex; align-items: center; max-width: 100%; }
#wrap .cf-static-math svg { display: block; max-width: 100%; height: auto; overflow: visible; }
#wrap #related_custom_contenteqn { padding-top: 8px; }
#wrap .cf-custom-tools { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; margin: 0; flex: 0 0 auto; }
#wrap .cf-custom-tools button { width: 32px; height: 32px; min-height: 32px; flex: 0 0 32px; padding: 0; font-size: 20px; line-height: 1; font-weight: 700; }
#wrap .cf-uncertainty-row { display: grid; grid-template-columns: 20px 174px minmax(0,1fr); align-items: center; gap: 6px; margin-top: 9px; }
#wrap .cf-math { font: italic 14px Georgia, serif; }
#wrap .toggle-btn-grp { margin: 0; display: flex; min-width: 0; border: 1px solid var(--cf-line); border-radius: 5px; overflow: hidden; }
#wrap .toggle-btn { position: relative; flex: 1; display: flex; justify-content: center; align-items: center; margin: 0; padding: 3px 2px; min-height: 27px; font-size: 13px; line-height: 19px; font-weight: 600; border: 0; border-radius: 0; background: var(--cf-surface); box-shadow: none; color: var(--cf-muted); white-space: nowrap; }
/* Override legacy borders without resizing on hover/selection. */
#wrap .toggle-btn { border: 1px solid transparent !important; }
#wrap .toggle-btn + .toggle-btn { border-left-color: var(--cf-line) !important; }
#wrap .toggle-btn:hover { border-color: #a0d5dc !important; }
#wrap .toggle-btn:has(input:checked) { border-color: #9494cd !important; }
#wrap .toggle-btn:has(input:disabled) { color: var(--cf-muted); background: var(--cf-lock); opacity: .65; cursor: default; }
#wrap .toggle-btn input:disabled { cursor: default; }
#wrap .cf-inactive-control { opacity: .55; }
#wrap .toggle-btn:has(input:checked) { background: var(--cf-wash); color: var(--cf-blue); font-weight: 700; }
#wrap .toggle-btn:has(input:disabled:checked) { background: var(--cf-wash); color: var(--cf-blue); opacity: .75; }
#wrap .toggle-btn input[type=radio] { display: block; position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
#wrap .toggle-btn:has(input:focus-visible) { outline: 2px solid var(--cf-blue); outline-offset: -2px; }
#wrap .errorval { float: none; margin: 0; min-width: 0; }
#wrap .cf-label-row { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 7px; margin-top: 7px; font-size: 13px; font-weight: 600; }
#wrap .cf-axis-field { display: grid; grid-template-columns: minmax(0,1fr) 70px; align-items: center; gap: 6px; }
#wrap .cf-parameters { border-left: 1px solid var(--cf-line); min-width: 0; display: flex; flex-direction: column; }
#wrap .cf-parameter-models { min-height: 220px; }
#wrap .relatedcontent { height: auto; }
#wrap .cf-param-table { border-collapse: collapse; width: 100%; table-layout: fixed; }
#wrap .cf-param-table th { height: 34px; padding: 7px 5px; border-bottom: 1px solid #b9b9b9; background: var(--cf-surface); color: var(--cf-muted); font-size: 12px; font-weight: 650; text-align: right; white-space: nowrap; }
#wrap .cf-param-table td { height: 36px; padding: 3px 4px; border-bottom: 1px solid #edf0f4; font: 500 12px var(--cf-mono-font); text-align: right; white-space: nowrap; }
#wrap .cf-param-table th:first-child, #wrap .cf-param-table td:first-child { text-align: left; padding-left: 10px; }
#wrap .cf-param-table td:first-child { font: italic 17px Georgia, serif; }
#wrap .cf-param-table th:nth-child(2) { text-align: left; }
#wrap .cf-param-table th:nth-child(3), #wrap .cf-param-table td:nth-child(3) { text-align: center; }
#wrap .cf-param-table th:nth-child(4), #wrap .cf-param-table td:nth-child(4) { border-left: 1px solid var(--cf-line); }
#wrap .cf-param-table th:nth-child(n+4), #wrap .cf-param-table td:nth-child(n+4) { padding-left: 8px; padding-right: 10px; }
#wrap .cf-param-table td:last-child { color: var(--cf-muted); }
#wrap .cf-param-table input[type=text] { font-size: 12px; min-height: 27px; padding: 3px 5px; }
/* Fix · Limit: Setup's colgroups and the fit tab's header widths below share plain percentages
   (13/24/16/23.5/23.5), so columns stay put between tabs; Chrome treats mixed-unit calc() column
   widths as auto. Guess keeps -4.805e-01 visible down to the 1440px layout. */
/* "Limit" overhangs its box on the right; 6px more right padding in the header and the cells
   moves both left by the same 3px, balancing the margins without misaligning them. */
#wrap .cf-param-table th:nth-child(3), #wrap .cf-param-table td:nth-child(3) { padding-left: 2px; padding-right: 8px; }
#wrap .cf-param-table td:nth-child(3) > * { vertical-align: middle; }
/* Fix and Limit share one 20px checkbox design (owner, 2026-10-04). Limit is a button that
   opens the limits editor; it is checked while limits are set and dims while Fix ignores them. */
#wrap .cf-param-table input[type=checkbox], #wrap .cf-param-table .cf-limit { appearance: none; display: inline-block; box-sizing: border-box; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; border: 1px solid #7d8997; border-radius: 4px; background: var(--cf-surface) center / 14px 14px no-repeat; box-shadow: none; color: transparent; font-size: 0; line-height: 0; vertical-align: middle; cursor: pointer; }
/* 20px boxes 13px apart, under "Fix" and "Limit" centered on the same 20 | 13 | 20 grid. */
#wrap .cf-param-table .cf-limit { margin-left: 13px; }
#wrap .cf-param-table input[type=checkbox]:checked, #wrap .cf-param-table .cf-limit-on { border-color: var(--cf-blue); background-color: var(--cf-blue); background-image: var(--cf-check); }
/* Hover enlarges the check mark in both boxes (owner, 2026-10-04). */
#wrap .cf-param-table input[type=checkbox]:hover:not(:disabled), #wrap .cf-param-table button.cf-limit:hover:not(:disabled) { border-color: var(--cf-blue); background: var(--cf-wash) center / 17px 17px no-repeat; }
#wrap .cf-param-table input[type=checkbox]:checked:hover:not(:disabled), #wrap .cf-param-table button.cf-limit-on:hover:not(:disabled) { border-color: #10519a; background: #10519a var(--cf-check) center / 17px 17px no-repeat; }
#wrap .cf-param-table input[type=checkbox]:focus-visible, #wrap .cf-param-table button.cf-limit:focus-visible { outline: 2px solid var(--cf-blue); outline-offset: 1px; }
#wrap .cf-param-table input[type=checkbox]:disabled, #wrap #cf-result .cf-param-table .cf-limit, #wrap .cf-param-table .cf-limit-ignored { opacity: .55; cursor: default; }
#wrap .cf-param-table .cf-fix-limit { display: inline-grid; grid-template-columns: 20px 20px; column-gap: 13px; justify-items: center; vertical-align: middle; }
/* One warning label (owner, 2026-10-04): AT LIMIT, the Metrics header's WARNINGS and Previous's NOT RANKED. */
#wrap .cf-param-table .cf-at-limit, #wrap .cf-warning-trigger, #wrap .cf-badge-warn { display: inline-block; min-height: 0; margin: 0; padding: 0 4px; border: 1px solid #e8c9a3; border-radius: 3px; background: #fdf3e7; box-shadow: none; color: #8a3b00; font: 700 10px/14px var(--cf-ui-font); letter-spacing: normal; text-transform: uppercase; white-space: nowrap; vertical-align: 1px; }
#wrap .cf-param-table .cf-at-limit { margin-right: 4px; }
#wrap .cf-params td.cf-at-limit-value { color: #8a3b00; font-family: var(--cf-ui-font); }
/* The limits popover (popover.js) floats outside #wrap. */
.cf-popover.cf-limit-popover { width: 256px; padding: 10px 12px; font: 500 13px var(--cf-ui-font); }
.cf-limit-popover .cf-limit-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
/* Inline text keeps the parameter's name on the title's baseline. */
.cf-limit-popover .cf-limit-title { display: block; margin: 0; font-size: 13px; font-weight: 700; line-height: 20px; }
.cf-limit-popover .cf-limit-name { font: italic 400 16px Georgia, serif; }
.cf-limit-popover .cf-limit-name sub { font-size: 11px; line-height: 0; }
.cf-limit-popover .cf-limit-title .cf-static-math { font: italic 15px Georgia, serif; }
.cf-limit-popover .cf-limit-clear { flex: 0 0 auto; margin: 0; padding: 1px 8px; min-height: 0; border: 1px solid var(--cf-line); border-radius: 4px; background: #fff; box-shadow: none; color: var(--cf-blue); font: 600 12px/18px var(--cf-ui-font); letter-spacing: normal; text-transform: none; cursor: pointer; }
.cf-limit-popover .cf-limit-clear:hover:not(:disabled) { border-color: var(--cf-blue); background: var(--cf-wash); }
.cf-limit-popover .cf-limit-clear:focus-visible { outline: 2px solid var(--cf-blue); outline-offset: 1px; }
.cf-limit-popover .cf-limit-clear:disabled { color: var(--cf-muted); opacity: .5; cursor: default; }
.cf-limit-popover .cf-limit-fields { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px 8px; align-items: center; }
/* main.css gives every focused text input a 10px left margin and its own font; outrank it so
   the two fields stay aligned whichever has focus. */
.cf-limit-popover input[type=text], .cf-limit-popover input[type=text]:focus { box-sizing: border-box; width: 100%; height: 24px; margin: 0; padding: 0 6px; border: 1px solid #c5d0dc; border-radius: 3px; background: #fff; box-shadow: none; color: var(--cf-ink); font: 13px var(--cf-mono-font); }
.cf-limit-popover input[type=text]:focus-visible { outline: 2px solid var(--cf-blue); outline-offset: 0; }
.cf-limit-popover input[type=text][aria-invalid=true] { border-color: #b00020; }
.cf-limit-popover .cf-limit-note { margin: 8px 0 0; color: #3c4a5a; font-size: 12px; line-height: 1.4; }
.cf-limit-popover .cf-limit-error { margin: 6px 0 0; color: #b00020; font-size: 12px; line-height: 1.4; }
#wrap .cf-empty-result { color: var(--cf-muted); }
#wrap .cf-evaluator { margin-top: auto; min-height: 112px; border-top: 1px solid var(--cf-line); padding: 11px 8px; background: var(--cf-surface); }
#wrap .cf-evaluator-placeholder, #wrap .cf-evaluator .cf-calc { display: grid; grid-template-columns: minmax(0,0.92fr) minmax(0,1.08fr); gap: 9px 6px; margin-top: 8px; align-items: end; }
#wrap .cf-evaluator-placeholder label, #wrap .cf-evaluator .cf-calc-field { min-width: 0; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 5px; }
#wrap .cf-evaluator-placeholder label { font: italic 14px Georgia, serif; }
/* "δx (1σ)" and "δy (1σ)" (owner, 2026-10-04) need a wider label column than x and y. */
#wrap .cf-evaluator .cf-calc-field.cf-calc-delta, #wrap .cf-evaluator-placeholder label.cf-calc-delta { grid-template-columns: 50px minmax(0,1fr); }
#wrap .cf-evaluator .cf-calc-level, .cf-eval-table .cf-calc-level { font: 500 11px var(--cf-ui-font); color: var(--cf-muted); white-space: nowrap; }
.cf-eval-table th.cf-eval-symbol { font: italic 14px Georgia, serif; }
#wrap .cf-evaluator-placeholder label:nth-child(3) { grid-column: 1; }
#wrap .cf-evaluator-placeholder button { padding: 4px 6px; }
#wrap .cf-result-actions { border-left: 1px solid var(--cf-line); display: grid; grid-template-rows: 34px minmax(84px,auto) minmax(102px,auto) 156px; background: var(--cf-surface); min-width: 0; }
#wrap #fittingright .cf-panel-head { background: var(--cf-surface); }
#wrap .cf-result-body { padding: 7px 11px; }
#wrap .cf-result-notes { padding: 5px 9px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; min-width: 0; }
#wrap .cf-result-notes .cf-warnings { font-size: 12px; padding: 5px; }
#wrap .cf-action-area { border-top: 1px solid var(--cf-line); padding: 10px; display: flex; flex-direction: column; background: var(--cf-surface); }
#submitbutton { margin: auto 0 0; width: 100%; }
#wrap #submitbuttona { width: 100%; min-height: 39px; font-size: 20px; font-weight: 800; background: var(--cf-blue); color: #fff; }
#wrap .cf-exports { width: 100%; gap: 5px; }
#wrap .cf-export { min-height: 31px; font-size: 13px; padding: 5px 8px; background: var(--cf-blue); color: white; border-color: #10519a; }
#wrap .cf-export:hover:not(:disabled), #wrap #submitbuttona:hover { background: #104e94; color: white; }
#footer { position: relative; padding: 7px 0; height: 46px; background: transparent; clear: both; }
#footer .csvbutton, #footer .sesbutton { margin: 0; }
#footer .sesbutton { margin-left: 6px; }
#displaysesid { position: absolute; left: 50%; top: 13px; transform: translateX(-50%); white-space: nowrap; cursor: text; user-select: text; }
#version-footer { padding: 3px 0 8px; background: transparent; font-size: 12px; }
.cf-data-skeleton { height: 741px; }
.cf-plot-skeleton { width: 100%; height: 320px; }
.cf-controls-skeleton { width: 100%; height: 411px; }

#wrap .cf-model-chip { min-height: 31px; padding: 5px 9px; border: 1px solid var(--cf-line); border-radius: 4px; background: var(--cf-lock); font-size: 13px; font-weight: 550; }
#wrap .cf-settings .cf-res-eq { margin: 0; font-size: 21px; }
#wrap .cf-params.cf-param-table th { text-transform: none; letter-spacing: normal; }
#wrap .cf-param-table th:nth-child(1) { width: 13%; }
#wrap .cf-param-table th:nth-child(2) { width: 24%; }
#wrap .cf-param-table th:nth-child(3) { width: 16%; }
#wrap .cf-param-table th:nth-child(4), #wrap .cf-param-table th:nth-child(5) { width: 23.5%; }
#wrap .cf-res-banner.cf-evaluator { flex: 0 0 auto; min-height: 112px; }
#wrap .cf-evaluator .cf-calc-title { max-width: none; }
#wrap .cf-evaluator .cf-calc-field:nth-of-type(3) { grid-column: 1; }
#wrap .cf-evaluator .cf-calc-field label, #wrap .cf-evaluator .cf-calc-field > span { font: italic 14px Georgia, serif; }
/* Each label sits against its own box (owner, 2026-10-04). */
#wrap .cf-evaluator .cf-calc-field label, #wrap .cf-evaluator-placeholder label > span { text-align: right; }
#wrap .cf-evaluator input[type=text], #wrap .cf-evaluator .cf-calc-out { height: 29px; line-height: 19px; }
#wrap .cf-evaluator .cf-calc-out { padding: 4px 7px; border: 1px solid var(--cf-line); border-radius: 4px; background: var(--cf-lock); color: var(--cf-muted); font-size: 13px; font-weight: 550; }
#wrap .cf-evaluator .cf-calc-run { margin: 0; padding: 4px 6px; }
/* Feedback takes the place of the result pair, so the panel never moves (owner, 2026-10-04). */
#wrap .cf-evaluator .cf-calc-message { grid-column: 1 / -1; display: flex; align-items: center; box-sizing: border-box; min-height: 29px; margin: 0; padding: 4px 8px; border: 1px solid var(--cf-line); border-radius: 4px; background: var(--cf-lock); color: #b00020; font-size: 12px; line-height: 16px; }
/* Direction, list and Calculate share the heading's 28px height. */
#wrap .cf-evaluator-header .cf-policy-help { margin-left: auto; }
#wrap .cf-evaluator-header .cf-calc-dir button { min-height: 26px; padding: 2px 8px; }
/* Model Evaluator list button and the shaded pair that holds results. */
#wrap .cf-evaluator-header .cf-calc-list { width: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #9fb0c3; border-radius: 4px; background: #fff; color: #1d2a39; }
#wrap .cf-evaluator-header .cf-calc-list[aria-expanded=true] { background: #e3edf9; border-color: #175eae; color: #175eae; }
#wrap .cf-evaluator-header .cf-calc-list svg { display: block; }
#wrap .cf-evaluator input[type=text].cf-calc-result { background: #eef1f5; color: #33475c; cursor: default; }
#wrap .cf-result-actions .cf-res-exports { width: 100%; border-left: 0; }
#wrap .cf-result-actions .cf-export-note { order: -1; margin-bottom: 6px; font-size: 12px; }
#wrap .cf-status { color: #276844; font-size: 11px; font-weight: 600; }
#wrap .cf-status.warning { color: #865316; }
#wrap .cf-metric { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 5px; text-align: center; width: 100%; container-type: inline-size; }
#wrap .cf-metric strong { flex-shrink: 0; max-width: 100%; font: 700 27px var(--cf-mono-font); font-size: min(27px, calc(100cqw / var(--cf-metric-width, 1))); white-space: nowrap; }
#wrap .cf-metric span { color: var(--cf-muted); font-size: 12px; }
/* Fit statistics (feature plan Q2). The goodness label opens them; it keeps the
   75px value area of the text it replaced, so nothing in Results moves. */
#wrap .cf-metric .cf-stats-trigger { margin: 0; padding: 1px 6px; min-height: 0; border: 0; border-radius: 3px; background: #e3edf9; color: #175eae; font: 600 13px/15px var(--cf-ui-font); letter-spacing: normal; text-transform: none; white-space: nowrap; box-shadow: none; cursor: pointer; }
#wrap .cf-metric .cf-stats-trigger:hover:not(:disabled), #wrap .cf-metric .cf-stats-trigger[aria-expanded=true] { background: #d2e2f6; color: #104e94; }
.cf-popover.cf-stats-popover { width: 272px; padding: 12px 14px; font: 500 13px/1.4 var(--cf-ui-font, "Open Sans", sans-serif); }
.cf-stats { display: flex; flex-direction: column; gap: 6px; outline: none; }
.cf-stats .cf-stats-title { margin: 0; font-size: 14px; line-height: 19px; font-weight: 700; color: #1d2a39; letter-spacing: normal; text-transform: none; }
.cf-stats .cf-stats-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; margin: 0; }
.cf-stats-grid dt, .cf-stats-grid dd { margin: 0; padding: 0; font-weight: 500; }
.cf-stats-grid dd { text-align: right; white-space: nowrap; font-family: var(--cf-mono-font, "Droid Sans Mono", monospace); }
.cf-stats .cf-stats-note { margin: 0; font-size: 12px; line-height: 1.45; color: #3c4a5a; }
.cf-stats-note a { color: #175eae; }
/* 1σ or 95% (feature plan Q3): a radio group on the right of the Parameters
   header. The header drops its vertical padding; its title stays centered. */
#wrap .cf-parameters .cf-panel-head { padding-top: 0; padding-bottom: 0; }
#wrap .cf-panel-tools { display: flex; align-items: center; gap: 8px; }
#wrap .cf-interval-note { margin: auto 10px 6px; font-size: 12px; line-height: 16px; color: #6b7785; text-align: right; }
#wrap .cf-interval-note + .cf-evaluator { margin-top: 0; }

#wrap .cf-panel-head > span { font-size: 12px; color: var(--cf-muted); }
#wrap .cf-control-section > h3 { margin-bottom: 9px; }
#wrap .cf-result-actions .cf-pill { display: inline-flex; align-items: center; gap: 5px; padding: 0; margin: 0; font-size: 11px; font-weight: 600; background: transparent; color: #276844; }
#wrap .cf-result-actions .cf-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#wrap .cf-result-actions .cf-pill-warn { color: #865316; }
#wrap .cf-result-notes p { margin: 0 0 6px; }
#wrap .cf-warning, #wrap .cf-result-notes .cf-plot-note { font-size: 12px; color: #865316; }
#wrap .cf-unused td { border-bottom-color: transparent; }
#wrap #submitbuttona { text-transform: uppercase; }
/* Loading placeholders. */
#wrap .cf-panel-skeleton { inset: 0; width: 100%; height: 100%; }

#wrap .cf-param-table td:first-child { white-space: normal; overflow-wrap: anywhere; }

#dataholder, #quickplot, #cf-plotbox, #bottomholder, #cf-result.cf-controls { border-width: 1.5px; }

#wrap .cf-prev-item { padding: 4px 10px; }

/* A saved fit owns a separate grid; Setup keeps its draft and undo history. */
#cf-fit-data { display: none; overflow-y: auto; font-family: var(--cf-mono-font); }
#dataholder.cf-table-locked #datatable { display: none; }
#dataholder.cf-table-locked #cf-fit-data { display: block; }

/* Keyboard focus. */
#wrap .toggle-btn:focus-within { outline: none; }
#wrap .toggle-btn:has(input:focus-visible) { outline: 2px solid var(--cf-blue); outline-offset: -2px; }
#wrap .toggle-btn input[type=radio] { appearance: none; outline: none; }
/* The plot fills its box; draw the rounded frame above the white canvas. */
#wrap #quickplot, #wrap #cf-plotbox { border: 0; }
#quickplot, .cf-plot-frame { position: relative; border-radius: 5px; }
#quickplot::after, .cf-plot-frame::after { content: ''; position: absolute; inset: 0; border: 1.5px solid var(--cf-line); border-radius: inherit; pointer-events: none; z-index: 6; }
#bottomholder, #cf-result.cf-controls { overflow: hidden; }


#wrap .cf-uncertainty-row > span:first-child { font: italic 14px Georgia, serif; }

/* Viewport overlays. */
.cf-dialog-box { box-sizing: border-box; width: min(600px, calc(100vw - 32px)); left: 50%; margin-left: 0; transform: translateX(-50%); max-height: calc(100vh - 32px); overflow: auto; top: 16px; }
#displaysesid { color: #465362; }
.cf-equation-note { font-size: 13px; line-height: 1.3; margin: 4px 0 0; }
.cf-equation-note:empty { display: none; }
#wrap :is(button, a, input, select, textarea):focus-visible { outline: 2px solid #0459b7; outline-offset: 2px; }

#curvefit-loading-error { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); box-sizing: border-box; width: min(696px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }


#wrap .cf-tab-setup:not(.cf-tab-on) { background: #d5e6fa; color: #174f8b; border-color: #8aafd9; }
#wrap .cf-tab-setup:not(.cf-tab-on):hover:not(:disabled) { background: #bed8f5; color: #123f70; }

/* Equation assistance. */
.cf-assist-content, .cf-assist-undo { font-size: .85rem; text-align: left; }
.cf-assist-content button, .cf-assist-undo button { font-size: inherit; padding: .25rem .5rem; margin: .2rem .3rem .2rem 0; }
.cf-assist-content p { margin: .4rem 0; }
.cf-assist-match { border-top: 1px solid #a7b3c2; margin-top: .5rem; padding-top: .3rem; }
.cf-assist-match ul { font-family: 'Droid Sans Mono', monospace; margin: .5rem 0; padding-left: 1.5rem; }
.cf-assist-undo:empty { display: none; }

.cf-assist-bubble { position: fixed; z-index: 1100; box-sizing: border-box; padding: 12px 16px; border: 1px solid #9bafc7; border-radius: 10px; background: #fff; color: #243447; box-shadow: 0 6px 24px #182d4933; overflow-y: auto; font-size: 14px; text-align: left; }
.cf-assist-bubble[hidden] { display: none; }

#wrap .cf-custom-tools button { margin-left: 0; margin-right: 0; }
.cf-assist-undo:not(:empty) { position: fixed; z-index: 1100; padding: 8px 12px; border: 1px solid #9bafc7; border-radius: 8px; background: white; box-shadow: 0 4px 16px #182d4933; }

.cf-assist-ok { color: #21683b; font-weight: 600; }

/* Export controls. */
#wrap .cf-result-actions { grid-template-rows: 34px auto minmax(0,1fr) auto; }
#wrap .cf-result-actions .cf-action-area { height: 253px; min-height: 253px; }
#wrap .cf-result-actions .cf-res-exports { min-height: 253px; padding: 10px; }
#wrap .cf-export-heading { margin: 0 0 10px; font: 700 13px/18px var(--cf-ui-font); letter-spacing: .7px; text-transform: uppercase; color: #263442; }
#wrap .cf-exports { margin-top: auto; gap: 7px; }
/* Four 44 px buttons and 7 px gaps fill the 197 px that three 61 px buttons used. */
#wrap .cf-export { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; height: 44px; min-height: 44px; padding: 4px 16px; border-radius: 5px; text-align: center; }
#wrap .cf-export-primary { font-size: 16px; font-weight: 700; line-height: 19px; }
#wrap .cf-export-secondary { font-size: 10px; font-weight: 600; line-height: 13px; letter-spacing: 1px; }
#wrap .cf-export .cf-spin, #wrap .cf-calc-run .cf-spin { position: absolute; width: 28px; height: 28px; left: calc(50% - 14px); top: calc(50% - 14px); border-width: 3px; border-color: #aac6e8; border-top-color: #fff; }
#wrap .cf-export[aria-busy=true] > :not(.cf-spin) { visibility: hidden; }
#wrap .cf-calc-run { position: relative; }
#wrap .cf-calc-run[aria-busy=true] { color: transparent; }
#wrap .cf-calc-run .cf-spin { border-top-color: var(--cf-blue); }
#wrap .cf-export:disabled:not([aria-busy=true]), #wrap .cf-export[aria-disabled=true] { opacity: .6; cursor: wait; pointer-events: none; }
#wrap #submitbuttona { height: 61px; min-height: 61px; }
#submitbutton { position: relative; }
#submitbutton:has([aria-busy=true])::after { content: ''; position: absolute; left: calc(50% - 16px); top: calc(50% - 16px); width: 32px; height: 32px; border: 3px solid #aac6e8; border-top-color: #fff; border-radius: 50%; animation: cf-spin .8s linear infinite; pointer-events: none; }
#wrap #submitbuttona[aria-busy=true] { color: transparent; }
@media (prefers-reduced-motion: reduce) { #submitbutton:has([aria-busy=true])::after { animation-duration: 3s; } }
.cf-warning-summary { position: relative; display: inline-block; }
#wrap .cf-warning-trigger { cursor: help; }
#wrap .cf-warning-trigger:hover:not(:disabled) { border-color: #c98a45; background: #fdf3e7; }
.cf-warning-popup { display: none; position: absolute; z-index: 20; right: 0; top: 100%; width: 300px; max-height: min(320px, 50vh); overflow-y: auto; padding: 10px 12px; background: white; color: #865316; border: 1px solid #a4afbb; border-radius: 5px; box-shadow: 0 4px 14px #17212c26; }
.cf-warning-summary:hover .cf-warning-popup, .cf-warning-summary:focus-within .cf-warning-popup { display: block; }
.cf-warning-popup p { margin: 0 0 6px; }
.cf-warning-popup p:last-child { margin-bottom: 0; }
#wrap button, #wrap input[type=submit], #wrap .resetbutton, #wrap .sesbutton, #wrap .csvbutton, #wrap .cf-export-link { font-family: var(--cf-ui-font); font-weight: 600; text-transform: uppercase; letter-spacing: .7px; }
#wrap .cf-tab-when { font-weight: 600; text-transform: none; letter-spacing: normal; }
/* PNG and SVG labels keep the plot toolbar's 37 x 22 px buttons. */
#wrap .cf-plot .modebar-btn-text { padding: 0; font: 700 9px var(--cf-ui-font); letter-spacing: normal; color: var(--cf-muted); }

/* Export notices occupy the existing gap, never move the metric or buttons. */
#wrap #cf-result .cf-result-notes { position: relative; }
#wrap .cf-result-notes .cf-export-note { position: absolute; top: 2px; left: 9px; right: 9px; margin: 0; display: flex; align-items: center; gap: 5px; color: #33475b; font-size: 12px; line-height: 14px; }
#wrap .cf-export-note > span { flex: 1; min-width: 0; }
#wrap .cf-export-note.cf-export-error { color: #a12d24; }
#wrap .cf-export-note button { flex: none; padding: 2px 0; border: 0; background: none; color: #175dab; text-decoration: underline; font-size: 11px; line-height: 14px; text-transform: none; letter-spacing: normal; cursor: pointer; }

.cf-dialog-compact .cf-dialog-box { position: fixed; top: 15vh; left: 50%; transform: translateX(-50%); margin-left: 0; width: min(520px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; box-sizing: border-box; padding: 24px; overflow-wrap: anywhere; }

/* Parameter scale. */
#wrap .cf-parameter-policy { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; }
#wrap .cf-policy-help { position: relative; display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 300; line-height: 16px; cursor: help; min-width: 0; }
#wrap .cf-policy-options { min-width: 0; width: 154px; flex: 0 0 auto; }
/* One shared divider, independent of selection, hover and disabled state. */
#wrap .cf-policy-options .toggle-btn:first-child { border-right-color: transparent !important; }
#wrap .cf-policy-options .toggle-btn + .toggle-btn { border-left-color: var(--cf-line) !important; }
#wrap .cf-policy-options .toggle-btn { flex: 1 1 0; min-width: 0; padding: 3px 9px; white-space: nowrap; text-align: center; }
#wrap .cf-policy-options strong { font: inherit; }
#wrap .cf-policy-options input:disabled { cursor: default; }
.cf-policy-tooltip { display: block; position: fixed; z-index: 1200; box-sizing: border-box; width: min(400px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; background: white; border: 1px solid #98adc5; border-radius: .5rem; box-shadow: 0 4px 16px #0002; padding: .7rem; font-size: 13px; font-weight: 400; line-height: 1.4; }
.cf-policy-tooltip[hidden] { display: none; }
.cf-policy-tooltip p { margin: .3rem 0 .7rem; }
.cf-help-math { display: inline-flex; vertical-align: middle; max-width: 100%; }
.cf-help-math svg { max-width: 100%; height: auto; fill: currentColor; }
.cf-parameters[hidden], .cf-evaluator[hidden], .cf-label-row[hidden] { display: none !important; }
#related_weightedmean_contenteqn { font-size: 1.4rem; }
#related_weightedmean_content { padding: .7rem; font-size: .9rem; line-height: 1.45; }

#wrap .cf-policy-help-icon { flex: 0 0 auto; font-size: 12px; }

/* Shared compact headers keep equations and evaluator fields full-width. */
#wrap .cf-model-header, #wrap .cf-uncertainty-header, #wrap .cf-evaluator-header, #wrap .cf-labels-header { gap: 8px; min-height: 32px; margin-bottom: 11px; }
/* Owner request, 2026-09-25: slightly tighter rows for the two lower headings. */
#wrap .cf-labels-header, #wrap .cf-evaluator-header { min-height: 28px; margin-bottom: 8px; }
#wrap .cf-model-header h3, #wrap .cf-uncertainty-header h3, #wrap .cf-evaluator-header h3 { flex: 0 0 auto; }
#wrap .cf-model-header select, #wrap .cf-model-header .cf-model-chip { flex: 1 1 0; min-width: 0; width: 0; margin: 0; }
#wrap .cf-model-header .cf-model-chip { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#wrap .cf-custom-tools[hidden] { display: none; }
/* The legacy add/remove margin would make Custom's header taller than others. */
#wrap .cf-custom-tools { gap: 6px; }
#wrap .cf-custom-tools button { margin: 0; }
#wrap .cf-policy-help-icon { font-size: 17px; line-height: 23px; }
#wrap .cf-evaluator-header > button { flex: 0 0 auto; box-sizing: border-box; height: 28px; min-height: 28px; margin: 0; padding: 0 6px; }
#wrap .cf-evaluator-header + .cf-calc, #wrap .cf-evaluator-header + .cf-evaluator-placeholder { margin-top: 0; }

/* One toggle design across the page (owner, 2026-10-04), after Absolute | Nominal: the radio
   groups above use .toggle-btn; 1σ | 95%, Data | Residuals and both x → y | y → x groups use
   these buttons. Selected is lavender-edged wash, hover a teal edge, locked dims. */
:is(#wrap, .cf-popover) .cf-segmented { display: flex; flex: 0 0 auto; box-sizing: border-box; margin: 0; border: 1px solid var(--cf-line); border-radius: 5px; overflow: hidden; background: var(--cf-surface); }
:is(#wrap, .cf-popover) .cf-segmented button { flex: 1 1 auto; margin: 0; min-height: 27px; padding: 3px 9px; border: 1px solid transparent; border-radius: 0; background: var(--cf-surface); box-shadow: none; color: var(--cf-muted); font: 600 13px/19px var(--cf-ui-font); letter-spacing: normal; text-transform: none; white-space: nowrap; cursor: pointer; }
:is(#wrap, .cf-popover) .cf-segmented button + button { border-left-color: var(--cf-line); }
:is(#wrap, .cf-popover) .cf-segmented button:hover:not(:disabled) { border-color: #a0d5dc; background: var(--cf-surface); }
:is(#wrap, .cf-popover) .cf-segmented button:is([aria-checked=true], [aria-pressed=true]),
:is(#wrap, .cf-popover) .cf-segmented button:is([aria-checked=true], [aria-pressed=true]):hover:not(:disabled) { border-color: #9494cd; background: var(--cf-wash); color: var(--cf-blue); font-weight: 700; }
:is(#wrap, .cf-popover) .cf-segmented button:focus-visible { outline: 2px solid var(--cf-blue); outline-offset: -2px; }
:is(#wrap, .cf-popover) .cf-segmented button:disabled { background: var(--cf-lock); color: var(--cf-muted); opacity: .65; cursor: default; }
:is(#wrap, .cf-popover) .cf-segmented button:disabled:is([aria-checked=true], [aria-pressed=true]) { background: var(--cf-wash); color: var(--cf-blue); opacity: .75; }
