/* Analyst workspace. Shares the palette and type system of the results charts.
   Kept separate from the report renderers so exported charts retain their styling. */
:root {
  --font-display: "STIX Two Text", Georgia, serif;
  --workspace-green: #14261e;
  --workspace-line: #e4e6dd;
  --radius-lg: 14px;
  --radius-xl: 14px;
}
.analyst-workspace { background: #faf9f5; }
.analyst-workspace .welcome { display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.analyst-workspace .welcome.hidden, .analyst-workspace [hidden] { display: none !important; }
.analyst-workspace button, .analyst-workspace input, .analyst-workspace select, .analyst-workspace textarea { font-family: var(--font-family); }
.workspace-sidebar { background: var(--workspace-green); color: #e8ebe4; display: flex; flex-direction: column; padding: 30px 16px 16px; min-height: 0; }
.workspace-brand { display: flex; align-items: center; gap: 10px; color: #e8ebe4; text-decoration: none; padding: 0 8px 42px; }
.workspace-brand > span { font: 600 24px/1 var(--font-display); letter-spacing: -.4px; }
.workspace-brand small { display: block; margin-top: 9px; font: 500 8px/1.4 var(--font-family-data); letter-spacing: 1.5px; color: #9aa79c; }
.sidebar-eyebrow, .section-eyebrow { font: 500 10px/1.6 var(--font-family-data); text-transform: uppercase; letter-spacing: 1.4px; }
.sidebar-eyebrow { color: #98aa9d; margin: 0 14px 12px; }
.workspace-sidebar .tab-list { display: flex; flex-direction: column; gap: 5px; padding: 0; border: 0; background: transparent; border-radius: 0; box-shadow: none; overflow: visible; flex: none; }
.workspace-sidebar .tab-btn, .sidebar-utility { display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #b7c6b8; min-height: 44px; padding: 11px 13px; width: 100%; font-size: 13px; font-weight: 500; text-decoration: none; text-align: left; cursor: pointer; box-shadow: none; }
.workspace-sidebar .tab-btn.active { background: #284034; border-color: #3c5345; color: #fff; box-shadow: inset 3px 0 #f0693f; }
.workspace-sidebar .tab-btn::after { display: none; }
.workspace-sidebar .tab-btn:hover, .sidebar-utility:hover { background: #23392d; color: #fff; }
.workspace-sidebar svg, .workspace-actions svg, .workspace-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.workspace-sidebar .tab-btn svg circle { fill: var(--workspace-green); }
.sidebar-divider { height: 1px; background: #304337; margin: 24px 12px 16px; }
.sidebar-utility.active { background: #284034; color: #fff; }
.sidebar-utility > span { margin-left: auto; }
.sidebar-footer { margin-top: auto; padding-top: 30px; }
.workspace-account { display: flex; align-items: center; gap: 9px; padding: 16px 5px 0; margin-top: 16px; border-top: 1px solid #304337; font-size: 12px; }
.account-avatar { display: grid; place-items: center; width: 29px; height: 29px; flex: none; background: #344c3d; border-radius: 50%; color: #e8ebe4; font-family: var(--font-display); }
#workspace-user { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#exit-app { display: grid; place-items: center; margin-left: auto; padding: 7px; border: 0; background: transparent; color: #b7c6b8; border-radius: 6px; cursor: pointer; }
#exit-app:hover { background: #344c3d; color: #fff; }
.analyst-workspace .welcome-main { padding: 0; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.workspace-header { display: flex; align-items: center; gap: 24px; justify-content: space-between; padding: 26px 36px 24px; border-bottom: 1px solid var(--workspace-line); flex: none; }
.workspace-heading { min-width: 0; }
.workspace-eyebrow { margin: 0 0 9px; display: flex; gap: 8px; font: 500 10px/1.5 var(--font-family-data); letter-spacing: .4px; color: var(--muted); }
#selected-analysis-name { max-width: 42ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.workspace-heading h1 { font: 500 34px/1.1 var(--font-display); letter-spacing: -.8px; margin: 0; }
.workspace-heading h1:focus { outline: none; }
.workspace-heading > p:last-child { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.workspace-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.workspace-save-status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); max-width: 170px; }
.workspace-save-status:empty { display: none; }
.workspace-save-status[data-state="saved"]::before { content: ""; width: 5px; height: 5px; background: #2f7a55; border-radius: 50%; }
.workspace-save-status[data-state="error"] { color: var(--danger); }
.analyst-workspace .btn { border-radius: 7px; min-height: 37px; font-size: 12px; font-weight: 550; line-height: 1.3; padding: 10px 15px; box-shadow: none; }
.analyst-workspace .btn-primary { background: #d14e2e; color: #fff; border: 1px solid #d14e2e; }
.analyst-workspace .btn-primary:hover { background: #b0401f; }
.analyst-workspace .btn-secondary { background: #fff; border: 1px solid #d8dccf; color: #24473a; }
.analyst-workspace .btn-secondary:hover { background: #eff1ea; }
.analyst-workspace button:disabled { opacity: .45; cursor: not-allowed; }
#run-analysis { display: flex; gap: 9px; align-items: center; padding: 12px 18px; min-height: 43px; white-space: nowrap; }
#run-analysis svg { fill: currentColor; width: 13px; height: 13px; }
#run-analysis[aria-busy="true"] svg { fill: none; border: 2px solid #fff6; border-top-color: #fff; border-radius: 50%; animation: workspace-spin 1s linear infinite; }
#run-analysis[aria-busy="true"] svg path { display: none; }
.workspace-notice { flex: none; margin: 14px 36px 0; padding: 12px 16px; border-radius: 7px; background: #fff1ec; border: 1px solid #efc7ba; color: #8f3524; font-size: 13px; }
.analyst-workspace .tabs { border: 0; border-radius: 0; background: transparent; box-shadow: none; min-height: 0; flex: 1; margin: 0; padding: 0; overflow: hidden; }
.analyst-workspace .tabs > .tab-panel { border: 0; box-shadow: none; border-radius: 0; background: transparent; min-height: 0; }
.analyst-workspace #tab-panel-analysis { padding: 30px 36px; overflow-y: auto; }
.analysis-tab-body { max-width: 1280px; width: 100%; margin: 0 auto; }
#welcome #tab-panel-analysis .analysis-tab-body { padding: 0; }
.library-intro { display: flex; align-items: center; gap: 30px; justify-content: space-between; margin-bottom: 26px; }
.section-eyebrow { color: #5e6b62; margin: 0 0 8px; }
.library-intro h2 { margin: 5px 0 8px; font: 500 25px/1.25 var(--font-display); letter-spacing: -.35px; }
.library-intro p { font-size: 12px; line-height: 1.6; color: #5e6b62; margin: 0; }
.library-count { background: #eff1ea; border: 1px solid #e0e3d8; padding: 7px 10px; border-radius: 6px; font: 11px/1.5 var(--font-family-data); white-space: nowrap; }
.library-search-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 16px; }
.workspace-search { width: min(320px, 100%); display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #d8dccf; border-radius: 7px; background: #fff; color: #7e8d83; }
.workspace-search:focus-within { outline: 2px solid #d14e2e; outline-offset: 2px; }
.workspace-search input { width: 100%; min-width: 0; border: 0; padding: 11px 0; background: transparent; font-size: 12px; outline: 0; box-shadow: none; }
.library-hint { color: #5e6b62; font-size: 11px; }
.library-hint span { padding-left: 7px; color: #d14e2e; }
.analyst-workspace #tab-panel-analysis .win-client { border: 0; background: none; box-shadow: none; padding: 0; }
.analyst-workspace #tab-panel-analysis .file-manager { gap: 16px; }
.analyst-workspace #analysisbox { border: 0; background: transparent; box-shadow: none; overflow: visible; min-height: 100px; flex: none; }
.analyst-workspace .analysis-list-header { display: flex; justify-content: flex-end; padding: 0 0 12px; background: none; border: 0; width: 100%; min-height: 0; font: 10px var(--font-family-data); color: var(--muted); }
.analyst-workspace #config-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(235px,1fr)); gap: 14px; padding: 0; margin: 0; overflow: visible; list-style: none; }
.analyst-workspace #config-list > li { padding: 0; border: 0; min-width: 0; background: none; }
.analyst-workspace #config-list .config-list-item { display: flex; flex-direction: column; gap: 10px; width: 100%; min-height: 144px; height: 100%; text-align: left; padding: 20px; border: 1px solid #e0e3d8; background: #fff; border-radius: 12px; box-shadow: none; font: 500 19px/1.25 var(--font-display); color: #1c2b23; transition: border-color 150ms, box-shadow 150ms; overflow-wrap: anywhere; }
.analyst-workspace #config-list .config-list-item:hover { border-color: #a4b6a7; box-shadow: 0 5px 18px #14261e0a; }
.analyst-workspace #config-list .config-list-item.active { border-color: #738e7b; background: #f6f8f2; box-shadow: inset 0 3px #24473a; }
.analysis-card-kicker { display: flex; align-items: center; justify-content: space-between; color: #7e8d83; font: 9px var(--font-family-data); letter-spacing: 1px; text-transform: uppercase; }
.analysis-card-meta { color: #5e6b62; font: 11px var(--font-family); margin-top: auto; }
.analysis-card-meta::after { content: " \2197"; color: #d14e2e; }
.analyst-workspace #tab-panel-analysis .file-manager-toolbar { border: 0; background: none; padding: 10px 0; gap: 12px; flex-wrap: wrap; }
.analyst-workspace .win-command-btn { width: auto; min-width: 0; height: auto; font-family: var(--font-family); }
.analyst-workspace #analysis-empty-state { min-height: 225px; border: 1px dashed #c4cab9; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; background: #ffffff70; }
.analyst-workspace .file-manager-empty-title { font: 500 24px var(--font-display); color: #24473a; }
.analyst-workspace .file-manager-empty-hint { font: 12px/1.7 var(--font-family); max-width: 45ch; color: #5e6b62; }
.analyst-workspace #tab-panel-files { padding: 0; }
.analyst-workspace .subtabs { border: 0; border-radius: 0; background: none; box-shadow: none; }
.setup-section-heading { padding: 22px 36px 14px; flex: none; }
.setup-section-heading h2 { font: 500 24px var(--font-display); margin: 0 0 5px; }
.setup-section-heading p { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0; }
.analyst-workspace .subtab-list[aria-label="Settings sections"] { flex: none; display: flex; gap: 22px; padding: 0 36px; margin: 0; border: 0; border-bottom: 1px solid var(--workspace-line); border-radius: 0; background: transparent; overflow-x: auto; }
.analyst-workspace .subtab-list[aria-label="Settings sections"] .subtab-btn { flex: none; background: transparent; color: #5e6b62; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 14px 0; font-size: 12px; box-shadow: none; white-space: nowrap; }
.analyst-workspace .subtab-list[aria-label="Settings sections"] .subtab-btn.active { border-bottom-color: #d14e2e; color: #24473a; font-weight: 650; }
.analyst-workspace #tab-panel-files .subtab-panel { border: 0; border-radius: 0; background: transparent; }
.analyst-workspace .subtab-panel-scroll { padding: 26px 36px; }
.fi-preset-guide { grid-column: 1 / -1; font: 12px/1.6 var(--font-family); color: var(--muted); }
.fi-preset-guide summary { cursor: pointer; color: #24473a; }
.fi-preset-guide dt { margin-top: 10px; font-weight: 600; color: #24473a; }
.fi-preset-guide dd { margin: 0; }
.fi-preset-guide p { margin: 12px 0 0; }
/* Let the existing tree fit the space left by the workspace header. */
@media (min-width: 769px) {
  #welcome #subtab-panel-fi .attribution-tree-panel { min-height: 0; }
}
@media (max-width: 768px) {
  #welcome #subtab-panel-fi .subtab-panel-scroll { overflow-y: auto; }
  #welcome #subtab-panel-fi .attribution-tab-layout { flex: none; }
  #welcome #subtab-panel-fi .attribution-tab-layout .fi-subtabs { flex: none !important; overflow: visible; }
  #welcome #subtab-panel-fi .attribution-right-pane { flex: none !important; min-height: 460px; }
}
.analyst-workspace .subtab-panel-footer { padding: 12px 36px; border-top: 1px solid var(--workspace-line); background: #f5f5ef; }
.analyst-workspace .subtab-panel-footer .files-tab-hint { font: 11px/1.6 var(--font-family); color: #5e6b62; }
.analyst-workspace input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .analyst-workspace select, .analyst-workspace textarea { border-radius: 6px; font-size: 12px; min-height: 34px; color: #1c2b23; }
.analyst-workspace input:disabled, .analyst-workspace select:disabled { background: #f0f1eb; }
.analyst-workspace .field > span, .analyst-workspace .report-field > span { font-size: 12px; }
.analyst-workspace #tab-panel-filestore { padding: 24px 36px; }
.analyst-workspace .filestore-client { border-radius: 12px; border: 1px solid #e4e6dd; background: #fff; box-shadow: none; }
.analyst-workspace .file-manager-table { font-family: var(--font-family); font-size: 12px; }
.analyst-workspace .file-manager-table th { font: 500 10px var(--font-family-data); letter-spacing: .5px; padding-top: 13px; padding-bottom: 13px; background: #f5f6f0; }
.analyst-workspace .file-manager-table td { padding-top: 12px; padding-bottom: 12px; border-color: #edf0e7; }
.analyst-workspace .file-manager-toolbar, .analyst-workspace .file-manager-status { background: #f8f9f4; font-family: var(--font-family); }
.analyst-workspace #tab-panel-run { padding: 32px 36px; gap: 0; }
.run-progress-heading { display: flex; align-items: center; gap: 20px; padding: 28px; background: #14261e; border-radius: 14px; color: #e8ebe4; margin-bottom: 22px; }
.run-progress-heading h2 { margin: 4px 0 9px; font: 500 28px var(--font-display); }
.run-progress-heading .section-eyebrow { color: #b7c6b8; }
.run-progress-heading p:last-child { font-size: 12px; color: #b7c6b8; margin: 0; }
.run-progress-mark { display: block; width: 34px; height: 34px; border: 2px solid #526457; border-top-color: #f0693f; border-radius: 50%; flex: none; }
.welcome[data-running="true"] .run-progress-mark { animation: workspace-spin 1s linear infinite; }
.analyst-workspace #tab-panel-run > .run-server-panel { background: transparent; border: 0; padding: 0 0 14px; }
.analyst-workspace #tab-panel-run .run-server-message { color: #5e6b62; font: 11px var(--font-family-data); }
.run-log-label { margin-bottom: 8px; }
.analyst-workspace #run-output-text { background: #fff; border: 1px solid #e4e6dd; border-radius: 9px; padding: 18px; min-height: 140px; color: #24473a; font: 12px/1.8 var(--font-family-data); }
.analyst-workspace #tab-panel-run .run-tab-status { border: 0; padding: 16px 0; background: none; }
.analyst-workspace #tab-panel-results { padding: 0; }
.analyst-workspace .results-tab-scroll { padding: 26px 36px; }
.results-empty-state { max-width: 650px; margin: 50px auto; padding: 48px; text-align: center; border: 1px dashed #c4cab9; border-radius: 14px; }
.results-empty-state h2 { font: 500 30px var(--font-display); margin: 8px 0 15px; }
.results-empty-state p { font-size: 13px; line-height: 1.7; color: #5e6b62; }
.results-empty-state .btn { margin-top: 10px; }
.analyst-workspace .dialog { border: 1px solid #e4e6dd; border-radius: 14px; padding: 28px; box-shadow: 0 25px 90px #14261e30; background: #fafbf7; }
.analyst-workspace .dialog-header h2 { font: 500 27px/1.2 var(--font-display); color: #1c2b23; }
.analyst-workspace .dialog-backdrop { background: #14261e66; backdrop-filter: blur(4px); }
.analyst-workspace .dialog-message { font: 13px/1.7 var(--font-family); }
.analyst-workspace #login-dialog { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(380px, 1fr); gap: 0; background: #faf9f5; padding: 0; backdrop-filter: none; overflow-y: auto; }
.analyst-workspace #login-dialog.hidden { display: none; }
.login-brand-panel { display: flex; flex-direction: column; align-self: stretch; background: radial-gradient(ellipse at 50% 60%, #2a4030, #14261e 68%); color: #e8ebe4; padding: 36px 9%; min-height: 100vh; position: relative; overflow: hidden; }
.login-brand { display: flex; align-items: center; gap: 15px; font: 500 31px var(--font-display); }
.login-story { margin: auto 0; padding: 34px 0 18px; }
.login-story .section-eyebrow { color: #a2b4a6; }
.login-story h1 { margin: 18px 0; font: 400 clamp(30px,3.2vw,48px)/1.08 var(--font-display); letter-spacing: -1.1px; }
.login-story > p:last-of-type { max-width: 32ch; font-size: 14px; line-height: 1.8; color: #b7c6b8; }
.login-brand-foot { color: #91a598; font: 10px var(--font-family-data); letter-spacing: .5px; }
.login-tree-art { width: calc(100% + 50px); margin: 20px -25px 0; }
.analyst-workspace #login-form { width: min(370px, calc(100% - 64px)); margin: auto; border: 0; border-radius: 0; background: none; box-shadow: none; padding: 42px 0; }
.analyst-workspace .login-dialog-header { display: block; margin-bottom: 32px; }
.analyst-workspace #login-title { font: 500 38px/1.2 var(--font-display); margin: 10px 0; letter-spacing: -.7px; }
.login-dialog-header > p:last-child { font-size: 13px; color: #5e6b62; margin: 0; }
.login-mobile-mark { display: none; }
.analyst-workspace #login-form .field { margin: 0 0 20px; gap: 8px; }
.analyst-workspace #login-form .field > span { font-size: 12px; font-weight: 550; }
.analyst-workspace #login-form input { min-height: 45px; padding: 12px; background: #fff; border: 1px solid #ccd3c6; }
.analyst-workspace #login-form .dialog-actions { display: flex; flex-direction: column-reverse; gap: 18px; margin: 26px 0 0; }
.analyst-workspace #login-form .btn-primary { width: 100%; min-height: 45px; display: flex; justify-content: center; gap: 14px; align-items: center; }
.login-help { color: #5e6b62; text-decoration: none; font-size: 11px; }
.login-help:hover { color: #d14e2e; }
.analyst-workspace .login-build-label { margin-top: 36px; text-align: center; color: #7e8d83; font: 10px var(--font-family-data); }
.analyst-workspace :focus-visible { outline: 2px solid #d14e2e; outline-offset: 3px; box-shadow: none; }
.analyst-workspace .workspace-sidebar :focus-visible { outline-color: #f7aa91; }
@keyframes workspace-spin { to { transform: rotate(360deg); } }
/* Replace high-specificity desktop-window rules in the original stylesheet. */
#welcome #tab-panel-analysis .win-client { flex: none; height: auto; min-height: 0; }
#welcome #tab-panel-analysis .file-manager { border: 0; background: none; border-radius: 0; overflow: visible; height: auto; flex: none; }
#welcome #analysisbox { max-height: none; display: block; height: auto; min-height: 0; }
#welcome #analysis-name-sort { background: transparent; height: auto; padding: 0 0 12px; justify-content: flex-end; }
#welcome #config-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(235px,1fr)); gap: 14px; padding: 0; background: transparent; }
#welcome #config-list > li { margin: 0; border: 0; padding: 0; min-width: 0; width: auto; }
#welcome #tab-panel-analysis .file-manager-toolbar { margin-top: 8px; padding: 8px 0; }
#welcome .file-manager .win-command-btn, #welcome #add-config { width: auto; height: auto; min-height: 37px; padding: 10px 14px; border-radius: 7px; font: 550 12px/1.3 var(--font-family); }
#welcome .file-manager .btn-danger { color: #a8352f; background: #fff; border: 1px solid #e3c9c3; }
#welcome #add-config { flex: none; margin-right: auto; }
#welcome #subtab-panel-configuration .config-details { padding: 0; background: transparent; border: 0; }
#welcome .files-tab-grid { grid-template-columns: 162px minmax(180px,1fr) 180px; grid-template-rows: 22px repeat(8,38px) auto; gap: 5px 16px; align-items: center; padding: 20px; border: 1px solid #e4e6dd; background: #fff; border-radius: 12px; }
#welcome .files-names-group, #welcome .files-dates-group { padding: 0; border: 0; background: transparent; border-radius: 0; }
#welcome #subtab-panel-configuration input:not([type="checkbox"]), #welcome #subtab-panel-configuration .field-input-suffix { border: 1px solid #d3d9cc; border-radius: 6px; background: #fafbf7; height: 36px; min-height: 36px; padding: 9px 11px; font: 12px/1.4 var(--font-family); }
#welcome #subtab-panel-configuration .files-tab-field--found { color: #2f7a55; }
#welcome #subtab-panel-configuration .files-tab-field--missing { color: #a8352f; }
#welcome #subtab-panel-configuration input:focus { border-color: #d14e2e; background: #fff; }
#welcome .files-tab-grid-heading { color: #5e6b62; font: 10px var(--font-family-data); letter-spacing: .5px; }
#welcome .files-tab-label { font-size: 12px; color: #24473a; }
#welcome .files-tab-date-eye-btn { border-radius: 5px; }
#welcome #tab-panel-files .files-tab-checkbox-label { font-family: var(--font-family); font-size: 12px; }
.analyst-workspace #login-dialog { justify-items: stretch; align-items: stretch; }
.analyst-workspace #login-form .field { display: flex; flex-direction: column; align-items: stretch; }
.analyst-workspace #login-form .login-build-label { margin-top: 38px; text-align: left; }
.analyst-workspace #login-form .dialog-actions { align-items: stretch; }
.analyst-workspace #login-form .password-input-wrap input { padding-right: 45px; }
.analyst-workspace #login-form .password-toggle { top: 50%; transform: translateY(-50%); }
#welcome #tab-panel-files :is(#subtab-panel-configuration, #subtab-panel-intervals, #subtab-panel-reports) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
#welcome #tab-panel-files :is(#subtab-panel-configuration, #subtab-panel-intervals, #subtab-panel-reports) select,
#welcome #tab-panel-files .fi-other-dropdown-toggle,
#welcome #tab-panel-files .report-labels-dropdown-toggle,
#welcome #tab-panel-files .report-excel-tabnames-dropdown-toggle {
  font: 12px/1.4 var(--font-family); min-height: 36px; border: 1px solid #d3d9cc; border-radius: 6px; background: #fafbf7; padding: 8px 11px; color: #1c2b23;
}
#welcome #tab-panel-files :is(#subtab-panel-configuration, #subtab-panel-intervals, #subtab-panel-reports) input:disabled, #welcome #tab-panel-files :is(#subtab-panel-configuration, #subtab-panel-intervals, #subtab-panel-reports) select:disabled { color: #7e8d83; background: #f1f3ec; }
#welcome #tab-panel-files :is(#subtab-panel-configuration, #subtab-panel-intervals, #subtab-panel-reports) input:focus, #welcome #tab-panel-files :is(#subtab-panel-configuration, #subtab-panel-intervals, #subtab-panel-reports) select:focus { border-color: #d14e2e; background: #fff; outline: 2px solid #d14e2e44; outline-offset: 1px; }
#welcome #tab-panel-files :is(#subtab-panel-configuration, #subtab-panel-intervals, #subtab-panel-reports) input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; border-radius: 4px; }
#welcome #tab-panel-files label, #welcome #tab-panel-files .field > span { font-family: var(--font-family); font-size: 12px; }
#welcome #report-subtab-panel-report { background: #fff; border: 1px solid #e4e6dd; border-radius: 12px; padding: 22px; margin-top: 15px; }
#welcome #report-subtab-panel-report .report-field { margin-bottom: 16px; }
#welcome .report-subtab-list { background: transparent; border-bottom: 1px solid #e4e6dd; padding: 0; }
#welcome .report-subtab-list .subtab-btn { font: 550 12px var(--font-family); background: transparent; border-radius: 0; }
#welcome .intervals-tab-body { background: #fff; border: 1px solid #e4e6dd; border-radius: 12px; padding: 22px; }
#welcome #results-tabs-grid .results-tab-card { border: 1px solid #e4e6dd; border-radius: 12px; overflow: hidden; padding: 8px; background: #fff; }
#welcome #results-tabs-grid .results-tab-card-label { font: 500 15px var(--font-display); padding: 12px 8px 8px; color: #24473a; }
#welcome .subtab-list[aria-label="Settings sections"] .subtab-btn::after { display: none; }
@media (max-width: 1100px) {
  .analyst-workspace .welcome { grid-template-columns: 184px minmax(0,1fr); }
  .workspace-sidebar { padding-left: 12px; padding-right: 12px; }
  .workspace-brand { padding-left: 2px; gap: 8px; }
  .workspace-brand > span { font-size: 21px; }
  .workspace-brand small { font-size: 7px; letter-spacing: 1px; }
  .workspace-header { padding: 22px 24px; }
  .workspace-actions { flex-direction: column-reverse; align-items: flex-end; gap: 7px; }
  .analyst-workspace #tab-panel-analysis, .analyst-workspace #tab-panel-filestore, .analyst-workspace #tab-panel-run, .analyst-workspace .subtab-panel-scroll { padding: 22px 24px; }
  .setup-section-heading { padding-left: 24px; padding-right: 24px; }
  .analyst-workspace .subtab-list[aria-label="Settings sections"] { padding-left: 24px; padding-right: 24px; gap: 20px; }
  .library-hint { display: none; }
  .workspace-heading h1 { font-size: 30px; }
}
@media (max-width: 760px) {
  .analyst-workspace .welcome { display: flex; }
  .workspace-sidebar { padding: 10px 16px; flex: none; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
  .workspace-brand { padding: 0; }
  .workspace-brand img { width: 23px; height: 27px; }
  .workspace-brand small, .sidebar-eyebrow, .sidebar-divider, .sidebar-footer .sidebar-utility, .workspace-account > span { display: none; }
  .workspace-sidebar .tab-list { flex-direction: row; grid-row: 2; grid-column: 1 / -1; gap: 5px; padding-right: 105px; }
  .workspace-sidebar .tab-btn { width: auto; flex: 1 1 0; min-width: 0; min-height: 35px; padding: 7px 5px; justify-content: center; font-size: 11px; gap: 5px; }
  .workspace-sidebar .tab-btn svg { width: 14px; height: 14px; }
  .workspace-sidebar > .sidebar-utility { grid-row: 2; grid-column: 1 / -1; justify-self: end; width: auto; padding: 7px 9px; min-height: 35px; font-size: 11px; gap: 5px; }
  .sidebar-footer { grid-row: 1; grid-column: 2; margin: 0; padding: 0; }
  .workspace-account { padding: 0; margin: 0; border: 0; }
  .workspace-header { padding: 20px 18px; align-items: flex-start; gap: 12px; }
  .workspace-eyebrow { font-size: 9px; flex-wrap: wrap; }
  .workspace-heading h1 { font-size: 28px; }
  .workspace-heading > p:last-child { display: none; }
  #run-analysis { min-height: 39px; font-size: 11px; padding: 10px 12px; }
  .workspace-save-status { font-size: 10px; }
  .analyst-workspace #tab-panel-analysis, .analyst-workspace #tab-panel-filestore, .analyst-workspace #tab-panel-run, .analyst-workspace .subtab-panel-scroll { padding: 20px 18px; }
  .library-intro { gap: 12px; }
  .library-intro h2 { font-size: 22px; }
  .library-intro p { font-size: 11px; }
  .library-count { font-size: 9px; }
  .analyst-workspace #config-list { grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); }
  .setup-section-heading { padding: 18px 18px 8px; }
  .setup-section-heading h2 { font-size: 22px; }
  .analyst-workspace .subtab-list[aria-label="Settings sections"] { padding: 0 18px; gap: 20px; }
  .analyst-workspace .subtab-list[aria-label="Settings sections"] .subtab-btn { font-size: 11px; }
  .analyst-workspace .subtab-panel-footer { padding: 10px 18px; }
  .workspace-notice { margin: 10px 18px 0; }
  .run-progress-heading { padding: 24px 20px; }
  .run-progress-heading h2 { font-size: 23px; }
  .analyst-workspace #login-dialog { display: flex; }
  .login-brand-panel { display: none; }
  .login-mobile-mark { display: block; margin-bottom: 24px; }
  .analyst-workspace #login-form { max-width: 360px; }
  .results-empty-state { padding: 30px 20px; margin: 15px 0; }
  #welcome .files-tab-grid { grid-template-columns: 122px minmax(155px,1fr) 150px; min-width: 520px; padding: 16px; gap: 5px 10px; }
  #welcome #config-list { grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); }
  .library-search-row { flex-wrap: wrap; }
  .workspace-search { width: 100%; }
  #welcome #report-subtab-panel-report { padding: 15px; }
  #welcome #report-subtab-panel-report .report-field { display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
  #welcome #report-subtab-panel-report .report-field > span { width: auto; }
  #welcome #report-subtab-panel-report .report-dates-inline, #welcome #report-subtab-panel-report .report-formats-inline, #welcome #report-subtab-panel-report .report-smoothing-inline, #welcome #report-subtab-panel-report .report-off-benchmark-inline { flex-wrap: wrap; gap: 9px; }
  .fti-card > header { flex-wrap: wrap; gap: 6px; }
  .fti-card > header .fti-note { flex-basis: 100%; text-align: left; margin-left: 0; order: 3; }
  .fti-card .fti-exports { margin-left: auto; }
  .fti-sowhat { padding: 18px; }
  .fti-sw-head { flex-wrap: wrap; }
  .fti-sw-live { margin-left: 0; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome[data-running="true"] .run-progress-mark, #run-analysis[aria-busy="true"] svg { animation: none; }
}

/* A shared flame tree: attribution roots below, an ember canopy above. */
.attribution-growth-tree { display: block; width: 100%; height: auto; overflow: visible; }
.ag-horizon { stroke: #b6c8ad24; stroke-width: 1; fill: none; }
.ag-root-link { stroke-width: 1.15; fill: none; opacity: .65; stroke-linecap: round; }
.ag-root-label { fill: #b9c6b5; font: 400 10px var(--font-family-data); paint-order: stroke; stroke: #172c22; stroke-width: 3px; stroke-linejoin: round; }
.ag-branch { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ag-root-halo { fill: #c7d8b7; opacity: .09; }
.ag-live .ag-root-halo { animation: attribution-root-pulse 3s ease-in-out infinite; transform-origin: 300px 258px; }
@keyframes attribution-root-pulse { 50% { opacity: .18; transform: scale(1.35); } }

/* Results preparation uses the same ink, paper and effect colours as the charts. */
.results-tab-body.results-preparing { visibility: hidden; }
.analyst-workspace #results-rendering-dialog { background: #0e1c17aa; backdrop-filter: blur(10px); padding: 20px; }
.analyst-workspace #results-rendering-dialog .results-loading-card {
  position: relative; isolation: isolate; overflow: hidden; width: min(620px, 100%); max-height: calc(100dvh - 40px);
  overflow-y: auto; padding: 24px 32px 27px; border: 1px solid #59736566; border-radius: 22px !important;
  background: radial-gradient(ellipse at 50% 30%, #294638 0, #182e23 38%, #14261e 72%);
  box-shadow: 0 36px 110px #0006, inset 0 1px #aec1ac20; color: #faf9f5; text-align: center;
}
#results-rendering-dialog .results-loading-card:focus { outline: none; }
.results-loading-topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; font: 400 10px/1.5 var(--font-family-data); color: #b5c5b7; }
.results-loading-topline > span:first-child { display: flex; align-items: center; gap: 8px; }
.results-loading-topline i { width: 5px; height: 5px; background: #ef815a; border-radius: 50%; box-shadow: 0 0 12px #ef815a66; }
.results-loading-elapsed { white-space: nowrap; }
#results-loading-elapsed { display: inline-block; min-width: 5ch; color: #faf9f5; font-variant-numeric: tabular-nums; }
.results-loading-tree { width: min(520px, 100%); margin: 6px auto -2px; }
#results-rendering-dialog .results-loading-eyebrow { margin: 0 0 9px; font: 400 9px/1.6 var(--font-family-data); text-transform: uppercase; letter-spacing: 1.7px; color: #b4c6ad; }
#results-rendering-dialog h2 { margin: 0 0 12px; font: 400 38px/1.12 var(--font-display); letter-spacing: -.8px; color: #faf9f5; }
#results-rendering-dialog .results-loading-description { margin: 0; min-height: 25px; font: 400 12px/1.65 var(--font-family); color: #bac9be; }
#results-rendering-dialog .results-loading-analysis { margin: 6px 0 20px; font: 400 10px/1.6 var(--font-family-data); color: #93aa9a; overflow-wrap: anywhere; }
.results-loading-stages { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; padding: 20px 0 0; margin: 0; border-top: 1px solid #adc4b326; gap: 12px; text-align: left; }
.results-loading-stages li { display: flex; flex-direction: column; gap: 7px; color: #8da393; font: 400 10px/1.4 var(--font-family); transition: color .25s; }
.results-loading-stages li > span { font: 400 10px/1.5 var(--font-family-data); color: #8da393; }
.results-loading-stages li[aria-current="step"] { color: #faf9f5; }
.results-loading-stages li[aria-current="step"] > span { color: #f18460; }
.results-loading-stages li.is-complete > span { font-size: 0; }
.results-loading-stages li.is-complete > span::after { content: "✓"; font-size: 12px; color: #bbd2ad; }
.results-loading-rail { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: #9cbdab1a; overflow: hidden; }
.results-loading-rail > span { display: block; width: 42%; height: 100%; background: linear-gradient(90deg, transparent, #ee8057, #bdd2a9, transparent); animation: results-scan 3s ease-in-out infinite; }
@keyframes results-scan { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

.results-archive-access { display: flex; justify-content: flex-end; padding: 20px 0 8px; border-top: 1px solid #e4e6dd; margin-top: 18px; }
#tab-panel-results .legacy-charts-trigger { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #d8dfd3; border-radius: 7px !important; background: transparent; color: #566c5e; font: 500 11px/1.4 var(--font-family); cursor: pointer; box-shadow: none; }
#tab-panel-results .legacy-charts-trigger:hover { color: #24473a; background: #edf0e8; border-color: #9caf9e; }
.legacy-charts-trigger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
#legacy-charts-count { margin-left: 2px; font: 400 10px var(--font-family-data); opacity: .7; }
.analyst-workspace #legacy-charts-dialog .legacy-charts-panel { width: min(980px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 28px; border: 1px solid #e0e5d9; border-radius: 16px; background: #faf9f5; }
.legacy-charts-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 24px; }
.legacy-charts-header .section-eyebrow { color: #7c8c7f; margin: 0 0 6px; }
.legacy-charts-header h2 { font: 400 30px/1.1 var(--font-display); color: #24473a; margin: 0 0 10px; }
.legacy-charts-header #legacy-charts-description { font: 400 12px/1.7 var(--font-family); color: #667c6d; margin: 0; max-width: 410px; }
.legacy-charts-close { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 1px solid #dfe4d8; background: transparent; color: #446050; border-radius: 50%; cursor: pointer; padding: 8px; box-shadow: none; }
.legacy-charts-close:hover { background: #e9ede3; }
.legacy-charts-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.legacy-charts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.legacy-charts-grid .results-tab-card { aspect-ratio: 1; padding: 10px; border: 1px solid #dfe4d8; border-radius: 10px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.legacy-charts-grid .results-tab-card:hover { border-color: #92aa93; box-shadow: 0 6px 20px #14261e0c; }
.legacy-charts-grid .results-tab-card-label { font: 500 14px/1.4 var(--font-display); color: #24473a; padding: 10px 4px 5px; flex: none; }
.legacy-charts-grid .results-tab-card-thumb { aspect-ratio: auto; flex: 1; min-height: 0; border: 0; border-radius: 5px; background: #fafbf7; }
.legacy-charts-grid .results-tab-card:focus-visible, .legacy-charts-close:focus-visible, #tab-panel-results .legacy-charts-trigger:focus-visible { outline: 2px solid #d14e2e; outline-offset: 3px; }
@media (max-width: 600px) {
  .analyst-workspace #results-rendering-dialog { padding: 14px; }
  .analyst-workspace #results-rendering-dialog .results-loading-card { padding: 22px 22px 28px; max-height: calc(100dvh - 28px); }
  .results-loading-topline { font-size: 9px; gap: 8px; }
  .results-loading-tree { width: calc(100% + 24px); max-width: none; margin: 15px -12px 8px; }
  #results-rendering-dialog h2 { font-size: 32px; }
  .results-loading-stages { gap: 8px; }
  .results-loading-stages li { font-size: 9px; }
  #tab-panel-results .legacy-charts-trigger { padding: 8px; gap: 6px; white-space: nowrap; font-size: 10px; }
  .legacy-charts-trigger svg { display: none; }
  .analyst-workspace #legacy-charts-dialog .legacy-charts-panel { padding: 22px; }
  .legacy-charts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .legacy-charts-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .ag-live .ag-root-halo, .results-loading-rail > span { animation: none; }
  .results-loading-rail > span { width: 100%; opacity: .6; }
  .results-loading-stages li, .legacy-charts-grid .results-tab-card { transition: none; }
}
.excel-treemap-view-toggle {
  align-self: flex-end;
  margin: 4px 12px;
  padding: 6px 12px;
  border: 1px solid #cfd3c7;
  background: #faf9f5;
  color: #24473a;
  font: 500 12px "Public Sans", sans-serif;
  cursor: pointer;
}
