/* Shared workspace palette: graphite navigation and warm, quiet data surfaces. */
:root {
  --ink: #172620;
  --ink-2: #35453b;
  --muted: #6b7770;
  --muted-2: #88938b;
  --line: #e2e8e1;
  --line-strong: #cdd9ce;
  --page: #f7f8f5;
  --surface: #ffffff;
  --surface-soft: #f0f4ef;
  --accent: #176b58;
  --accent-dark: #0e5745;
  --accent-soft: #e8f3ed;
  --blue: var(--accent);
  --blue-dark: var(--accent-dark);
  --blue-soft: var(--accent-soft);
  --navy: #223229;
  --navy-2: #2e4437;
  --purple: var(--accent);
  --purple-soft: var(--accent-soft);
  --shadow-sm: 0 1px 2px #1726200c;
  --shadow-md: 0 12px 34px #17262014;
}
#app-shell {
  --sidebar-width: 236px;
  --ink: #172620;
  --ink-2: #35453b;
  --muted: #6b7770;
  --line: #e2e8e1;
  --line-strong: #cdd9ce;
  --page: #f7f8f5;
  --surface-soft: #f0f4ef;
  --blue: var(--accent);
  --blue-dark: var(--accent-dark);
  --blue-soft: var(--accent-soft);
  --shadow-sm: 0 1px 2px #1726200c;
  --radius-md: 10px;
  --radius-lg: 12px;
  color: var(--ink);
  background: var(--page);
  font-size: 14px;
}
#app-shell .workspace-global-bar {
  position: static;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 21px 16px 17px;
  color: #f7faf6;
  background: transparent;
  border-bottom: 1px solid #ffffff1a;
}
.workspace-global-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; color: #fff; text-decoration: none; white-space: nowrap; }
.workspace-global-brand:visited { color: #fff; }
.workspace-global-brand img { width: 31px; height: 31px; border: 1px solid #ffffff2b; border-radius: 9px; }
.workspace-global-brand strong { font-weight: 700; letter-spacing: -.3px; }
.workspace-global-brand span { color: #c7dbc9; font-weight: 560; }
.workspace-global-label { order: 1; padding-left: 41px; font-size: 12px; color: #9daf9f; letter-spacing: .02em; }
.workspace-search { order: 2; display: flex; justify-content: space-between; align-items: center; gap: 7px; width: 100%; height: 36px; margin-top: 5px; padding: 0 10px; border: 1px solid #ffffff28; border-radius: 8px; background: #ffffff0d; color: #c8d7cb; text-align: left; cursor: pointer; font-size: 13px; }
.workspace-search > span { display: flex; align-items: center; gap: 8px; }
.workspace-search svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; flex-shrink: 0; }
#app-shell .workspace-search > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-search kbd { padding: 2px 4px; border: 1px solid #ffffff29; border-radius: 4px; font-size: 10px; color: #aebfaf; font-family: inherit; white-space: nowrap; }
.workspace-search:hover { background: #ffffff1c; border-color: #ffffff44; color: #fff; }
#app-shell .sidebar { inset: 0 auto 0 0; width: 236px; display: flex; flex-direction: column; padding: 0; overflow: hidden; background: #223229; border-right: 1px solid #203026; color: #edf5ee; }
.workspace-module-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 0 0 auto; width: auto; align-items: stretch; gap: 3px; margin: 14px 11px 9px; padding: 4px; border: 1px solid #ffffff18; border-radius: 10px; background: #ffffff0c; }
#app-shell .workspace-module { display: flex; width: 100%; min-width: 0; min-height: 50px; height: auto; margin: 0; padding: 5px 1px; flex-direction: column; gap: 2px; border: 0; border-radius: 7px; color: #b9cbbd; background: transparent; font-size: 13px; font-weight: 550; white-space: nowrap; }
.workspace-module-icon { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; }
.workspace-module-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
#app-shell .workspace-module.is-active { color: #fff; background: #ffffff20; font-weight: 650; }
#app-shell .workspace-module.is-active .workspace-module-icon { background: transparent; color: #b9e8cc; }
#app-shell .nav-item.workspace-module.is-active > .workspace-module-icon { color: #fff; }
#app-shell .workspace-module:hover:not(.is-active) { color: #fff; background: #ffffff14; }
.workspace-channel-sidebar { display: flex; flex: 1 1 auto; flex-direction: column; width: 100%; min-width: 0; min-height: 0; }
.workspace-channel-heading { display: flex; min-height: 50px; flex-direction: column; justify-content: center; gap: 2px; padding: 0 18px; border-bottom: 0; }
.workspace-channel-heading strong { color: #f3f8f3; font-size: 18px; letter-spacing: -.3px; }
.workspace-channel-heading small { color: #93a696; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
#app-shell .main-nav { display: flex; flex-direction: column; gap: 20px; margin: 0; padding: 12px 10px; overflow: auto; }
.workspace-nav-group { display: flex; flex-direction: column; gap: 3px; }
#app-shell .nav-group-label { min-height: auto; padding: 0 11px 8px; color: #91a697; font-size: 13px; font-weight: 650; letter-spacing: .03em; }
#app-shell .workspace-channel-sidebar .nav-item { min-height: 39px; height: auto; width: 100%; padding: 8px 11px; gap: 11px; color: #d0ddd2; border-radius: 8px; border: 0; font-size: 14px; font-weight: 500; }
#app-shell .workspace-channel-sidebar .nav-item.is-active { background: #dcefe3; color: #113f30; font-weight: 700; box-shadow: none; }
#app-shell .workspace-channel-sidebar .nav-item:hover:not(.is-active) { background: #ffffff14; color: #fff; }
#app-shell .workspace-channel-sidebar .nav-icon { width: 18px; height: 18px; color: #abc0af; }
#app-shell .workspace-channel-sidebar .nav-item.is-active .nav-icon { color: #176b58; }
#app-shell .workspace-channel-sidebar .nav-icon svg { width: 17px; height: 17px; }
#app-shell .nav-state { margin-left: auto; font-size: 11px; max-width: 58px; padding: 2px 4px; background: #ffffff18; color: #aac0ae; border: none; }
#app-shell .nav-state.is-processing { background: #dcefe5; color: #247458; }
#app-shell .sidebar-foot { margin-top: auto; padding: 13px 12px 15px; border-top: 1px solid #ffffff1a; }
#app-shell .help-box { min-height: 43px; margin: 0 0 12px; padding: 6px 5px; border: 0; background: none; }
#app-shell .help-box strong { font-size: 13px; color: #e6efe7; }
#app-shell .help-box span { color: #a6b7a8; font-size: 12px; }
#app-shell .help-box .help-icon { color: #bdd7c3; width: 26px; height: 26px; border-color: #ffffff38; }
#app-shell .user-chip { gap: 9px; padding: 0; border: 0; }
#app-shell .user-chip .avatar { width: 32px; height: 32px; background: #d2e8d7; color: #13513d; border-radius: 9px; font-size: 14px; }
#app-shell .user-chip strong { color: #f0f6f0; font-size: 13px; }
#app-shell .user-chip span, #app-shell .user-chip button { color: #aac0ae; font-size: 12px; }
#app-shell .app-main { margin-left: 236px; padding-top: 0; min-width: 0; background: var(--page); }
#app-shell .topbar { position: sticky; top: 0; height: 64px; min-height: 64px; gap: 18px; padding: 0 32px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: none; z-index: 25; }
#app-shell .topbar-title { flex: 0 1 auto; min-width: 0; gap: 10px; font-size: 14px; white-space: nowrap; }
#app-shell .topbar-title strong { font-size: 20px; color: var(--ink); letter-spacing: -.4px; }
#app-shell .topbar-title > span { color: var(--muted); }
#app-shell .topbar-actions { flex: 0 0 auto; gap: 9px; }
#app-shell .prototype-note { color: var(--muted); font-size: 12px; background: none; padding: 0; border: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app-shell .changelog-trigger { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 5px; }
#app-shell .changelog-trigger svg { width: 15px; height: 15px; }
#app-shell .button { min-height: 36px; padding: 7px 14px; font-size: 14px; border-radius: 8px; box-shadow: none; }
#app-shell .button-primary { background: var(--accent); border-color: var(--accent); }
#app-shell .button-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
#app-shell .button-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink-2); }
#app-shell .button-secondary:hover { border-color: #aac7b2; background: #f7fbf8; }
#app-shell .page-container { max-width: 1600px; margin: 0 auto; padding: 18px 32px 48px; }
#app-shell .topbar .workspace-source { position: relative; display: flex; flex: 1 1 280px; min-width: 240px; max-width: 430px; min-height: 0; align-items: center; flex-wrap: nowrap; gap: 8px; margin-left: auto; padding: 0; background: transparent; border: 0; font-size: 14px; color: var(--muted); }
#app-shell .topbar .workspace-source[hidden] { display: none; }
.workspace-source label { flex: 0 0 auto; color: var(--muted); font-weight: 600; white-space: nowrap; }
#app-shell .workspace-source select { flex: 1 1 150px; width: auto; min-width: 135px; min-height: 36px; max-width: 195px; padding: 5px 30px 5px 10px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
#app-shell .workspace-source select:hover { border-color: #9bbcaa; }
.workspace-source #workspace-source-info:not(:empty) { flex: 0 1 auto; min-width: 0; max-width: 140px; overflow: hidden; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-source select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.workspace-source [role="alert"]:not([hidden]) { position: absolute; top: calc(100% + 8px); left: 0; z-index: 5; width: min(420px, calc(100vw - 32px)); padding: 9px 11px; border: 1px solid #e7b7ae; border-radius: 7px; background: #fff8f5; box-shadow: 0 8px 20px #17262017; color: #a33d31; line-height: 1.5; }
.source-transition-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 20px; background: rgb(247 249 247 / 62%); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.source-transition-status { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 11px 17px; border: 1px solid #dce6de; border-radius: 12px; background: rgb(255 255 255 / 94%); box-shadow: 0 10px 32px #1726201a; color: #35453b; font-size: 14px; font-weight: 600; line-height: 1.4; }
.source-transition-spinner { display: inline-block; width: 17px; height: 17px; flex: 0 0 17px; border: 2px solid #d7e6dc; border-top-color: #176b58; border-radius: 50%; animation: source-transition-spin .75s linear infinite; }
@keyframes source-transition-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .source-transition-spinner { animation-duration: 1.8s; } }
#app-shell .archive-preview-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 30px; background: #f6f1e7; border-bottom: 1px solid #e9decb; color: #75664d; font-size: 12px; }
#app-shell .archive-preview-notice[hidden] { display: none; }
.archive-preview-notice > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.archive-preview-notice strong { font-weight: 600; white-space: nowrap; }
#app-shell .archive-preview-notice .button { min-height: 28px; font-size: 12px; white-space: nowrap; }
#app-shell[data-preview="true"] [aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
@media (max-width: 640px) { #app-shell .archive-preview-notice { align-items: flex-start; padding: 10px 16px; gap: 10px; } .archive-preview-notice > div { gap: 5px; line-height: 1.7; } }
#app-shell .analysis-scope-bar { position: relative; top: auto; padding: 10px 32px 0; background: var(--page); border: 0; z-index: 20; box-shadow: none; }
#app-shell .analysis-scope-shell { max-width: 1536px; margin: auto; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
#app-shell .analysis-scope-inner { min-height: 40px; padding: 0; gap: 14px; grid-template-columns: minmax(230px, 1fr) auto auto; align-items: center; }
#app-shell .analysis-scope-inner:has(.analysis-scope-field[hidden]) { grid-template-columns: minmax(0, 1fr) auto; }
#app-shell .analysis-scope-field, #app-shell .analysis-scope-summary-card { display: flex; align-items: center; gap: 10px; padding: 0; background: none; border: 0; box-shadow: none; }
#app-shell .analysis-scope-field[hidden], #app-shell .analysis-scope-actions[hidden] { display: none; }
#app-shell .analysis-scope-field > span, #app-shell .analysis-scope-summary-card > span { font-size: 14px; color: var(--muted); }
#app-shell .analysis-scope-field > span { flex-shrink: 0; }
#app-shell .analysis-scope-field .searchable-filter { flex: 1; max-width: 440px; }
#app-shell .analysis-scope-summary-card p { margin: 0; color: var(--ink-2); font-size: 14px; }
#app-shell .analysis-scope-actions { gap: 9px; }
#app-shell .analysis-scope-actions .text-button { font-size: 14px; }
#app-shell .analysis-scope-filters { padding: 14px 0 4px; margin-top: 9px; border-top: 1px solid var(--line); background: none; }
#app-shell .dashboard-filter-grid { gap: 12px; }
#app-shell .dashboard-heading, #app-shell .processing-heading { margin-bottom: 16px; gap: 16px; }
#app-shell .dashboard-heading h1, #app-shell .workspace-planned-heading h1, #app-shell .processing-heading h1 { margin: 3px 0 6px; font-size: 25px; letter-spacing: -.8px; font-weight: 680; }
#app-shell .dashboard-heading p, #app-shell .processing-heading p { font-size: 14px; color: var(--muted); line-height: 1.6; }
#app-shell .eyebrow { font-size: 11px; color: var(--accent); font-weight: 650; letter-spacing: .06em; }
#app-shell .dashboard-heading-actions { gap: 9px; }
#app-shell .metric-refresh-feedback { font-size: 12px; color: #6e7273; }
.workspace-study-guide { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; padding: 16px 19px; margin-bottom: 20px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.workspace-study-guide > div:first-child { display: flex; align-items: center; gap: 12px; }
.workspace-guide-icon { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; background: var(--accent-soft); color: var(--accent-dark); font-size: 23px; border-radius: 8px; }
.workspace-study-guide strong { color: #575b5c; font-size: 14px; font-weight: 600; }
.workspace-study-guide p { margin: 5px 0 0; font-size: 12px; color: #696d6e; }
.workspace-study-steps { display: flex; align-items: center; gap: 12px; color: #747879; }
.workspace-study-steps button { padding: 3px 0; border: 0; background: none; color: #707475; cursor: pointer; font-size: 12px; }
.workspace-study-steps button:hover { color: #313536; text-decoration: underline; }
.workspace-study-steps small { margin-right: 3px; font-size: 12px; color: #717576; }
#app-shell .data-health-strip { padding: 7px 0; margin: 0 0 12px; background: none; border: 0; border-radius: 0; color: var(--muted); }
#app-shell .data-health-strip strong { font-size: 12px; font-weight: 500; }
#app-shell .data-health-strip span { font-size: 12px; }
#app-shell .dashboard-kpi-grid { gap: 0; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-sm); }
#app-shell .dashboard-kpi-grid article { min-height: 108px; padding: 17px 20px; background: none; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; }
#app-shell .dashboard-kpi-grid article:last-child { border-right: 0; }
#app-shell .dashboard-kpi-grid article > span { color: #686c6d; font-size: 12px; }
#app-shell .dashboard-kpi-grid article > strong { margin: 10px 0 6px; color: var(--ink); font: 650 26px/1.1 Arial, sans-serif; letter-spacing: -1px; }
#app-shell .dashboard-kpi-grid article > small { color: #717576; font-size: 12px; }
#app-shell #page-home .dashboard-primary-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
.dashboard-metric-details { margin: 0 0 22px; padding: 12px 0 0; color: var(--muted); font-size: 12px; }
.dashboard-metric-details > summary { width: fit-content; cursor: pointer; color: #6b6f70; }
.dashboard-metric-details > p { max-width: 850px; margin: 12px 0; line-height: 1.8; }
.dashboard-interaction-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.dashboard-interaction-metrics span, .dashboard-interaction-metrics strong, .dashboard-interaction-metrics small { display: block; }
.dashboard-interaction-metrics strong { margin: 6px 0; color: #575b5c; font-size: 18px; }
.dashboard-interaction-metrics small { color: var(--muted); font-size: 12px; }
#app-shell .dashboard-grid { gap: 17px; }
#app-shell .dashboard-panel, #app-shell .processing-batches, #app-shell .analysis-launcher { border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-sm); background: #fff; }
#app-shell .panel-heading { padding: 18px 19px 9px; }
#app-shell .panel-heading h2 { color: #575b5c; font-size: 14px; font-weight: 600; }
#app-shell .panel-heading p { margin-top: 5px; font-size: 12px; color: #6f7374; }
#app-shell .panel-controls select { min-height: 27px; padding: 4px 8px; font-size: 12px; border-color: #e2e6e7; border-radius: 4px; color: #636768; }
#app-shell .chart-wrap { padding: 5px 15px 12px; }
#app-shell .snapshot-empty { background: none; color: #6e7273; border: 1px dashed #dfe3e4; }
#app-shell .dashboard-decisions { gap: 17px; }
#app-shell .dashboard-decisions article { background: #fff; border: 1px solid var(--line); padding: 20px; border-radius: 7px; box-shadow: none; }
#app-shell .dashboard-decisions article strong { color: #626667; font-size: 14px; }
#app-shell .dashboard-decisions article p { font-size: 12px; color: #6c7071; }
#app-shell .data-table thead th { padding: 11px 13px; color: var(--muted); background: #f6f9f6; font-size: 12px; font-weight: 500; }
#app-shell .data-table td { font-size: 12px; }
#app-shell .text-button { color: #636768; font-size: 12px; }
#app-shell .executive-hero, #app-shell .task-hero, #app-shell .processing-hero { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-sm); }
#app-shell .release-banner { margin: 12px 30px 0; border-radius: 6px; box-shadow: none; }
.workspace-planned-page { max-width: 1100px; margin: auto; }
#app-shell:not([data-workspace="video"]) .app-main { background: #fff; }
.workspace-blank-state { min-height: calc(100dvh - 260px); display: grid; place-items: center; color: #6b6f70; font-size: 16px; letter-spacing: 2px; }
.workspace-planned-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 7px 0 25px; }
.workspace-eyebrow { color: #717576; font: 600 10px/1.5 Arial, sans-serif; letter-spacing: 1.7px; }
.workspace-planned-heading p { font-size: 14px; color: #6b6f70; margin: 0; }
.workspace-status { padding: 6px 9px; color: #696d6e; font-size: 12px; border: 1px solid #dee2e3; border-radius: 5px; background: #eff3f4; white-space: nowrap; }
.workspace-research-question { padding: 29px 30px; border: 1px solid #e1e5e6; background: #f1f5f6; border-radius: 8px; }
.workspace-research-question > span { font-size: 12px; color: #6f7374; }
.workspace-research-question h2 { margin: 11px 0 13px; color: #565a5b; font-size: 22px; font-weight: 600; }
.workspace-research-question p { margin: 0; max-width: 730px; color: #696d6e; font-size: 14px; line-height: 1.9; }
.workspace-method { margin-top: 30px; }
.workspace-section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.workspace-section-heading h2 { font-size: 14px; font-weight: 600; color: #6a6e6f; }
.workspace-section-heading > span { color: #737778; font-size: 12px; }
.workspace-method-grid { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.workspace-method-grid article { padding: 25px; border-right: 1px solid var(--line); }
.workspace-method-grid article:last-child { border-right: 0; }
.workspace-step-number { color: #797d7e; font: 500 21px/1 Arial, sans-serif; }
.workspace-method-grid h3 { margin: 19px 0 11px; font-size: 14px; color: #5d6162; font-weight: 600; }
.workspace-method-grid p { font-size: 12px; line-height: 1.9; color: #6c7071; margin: 0; }
.workspace-data-contract { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.workspace-data-contract span { font-size: 12px; color: #717576; }
.workspace-data-contract p { color: #787c7d; font-size: 14px; margin: 9px 0 0; }
.workspace-evidence-note { display: flex; gap: 13px; align-items: flex-start; padding: 22px 0; color: #707475; }
.workspace-evidence-note > span { font-size: 22px; line-height: 1; }
.workspace-evidence-note strong { font-weight: 500; font-size: 12px; color: #646869; }
.workspace-evidence-note p { font-size: 12px; color: #6e7273; margin: 6px 0 0; line-height: 1.8; }
.workspace-planned-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-top: 16px; }
.workspace-planned-footer p { color: #727677; font-size: 12px; }
.workspace-command { width: min(560px, calc(100vw - 30px)); max-height: 80vh; margin: 14vh auto auto; padding: 17px; border: 1px solid #d1d5d6; border-radius: 10px; background: #fff; color: #404445; box-shadow: 0 24px 90px #171b1c40; }
.workspace-command::backdrop { background: #191d1e60; backdrop-filter: blur(3px); }
.workspace-command-heading { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; }
.workspace-command-heading button { border: 1px solid #e2e6e7; padding: 3px 6px; border-radius: 4px; font-size: 12px; background: #f5f9fa; color: #686c6d; cursor: pointer; }
.workspace-command input { width: 100%; padding: 12px; margin: 17px 0 10px; border: 1px solid #d1d5d6; border-radius: 6px; background: #fcfafc; font-size: 14px; }
.workspace-command-results { display: flex; flex-direction: column; max-height: 45vh; overflow: auto; gap: 3px; }
.workspace-command-results button { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 12px; border: 0; border-radius: 5px; background: transparent; text-align: left; cursor: pointer; }
.workspace-command-results strong { font-size: 14px; font-weight: 550; }
.workspace-command-results span { font-size: 12px; color: #707475; }
.workspace-command-results button:hover, .workspace-command-results button:focus-visible { background: #ecf0f1; }
.workspace-command-hint { margin: 13px 0 0; font-size: 12px; color: #727677; }
/* Keep secondary copy readable without competing with the findings. */
#app-shell .workspace-channel-sidebar .nav-item { font-size: 14px; }
#app-shell .dashboard-heading p, #app-shell .processing-heading p,
.workspace-study-guide p, .workspace-planned-heading p,
.workspace-research-question p, .workspace-method-grid p,
.workspace-evidence-note p, .workspace-planned-footer p { color: #6e7273; font-size: 14px; }
#app-shell .dashboard-kpi-grid article > span { font-size: 12px; color: #717576; }
#app-shell .dashboard-kpi-grid article > small,
#app-shell .panel-heading p, #app-shell .data-health-strip span { font-size: 12px; color: #636768; }
@media (min-width: 1500px) {
  #app-shell .page-container { padding: 24px 42px 48px; }
  #app-shell .analysis-scope-bar, #app-shell .topbar { padding-left: 42px; padding-right: 42px; }
}
@media (max-width: 1200px) {
  #app-shell .prototype-note { display: none; }
  #app-shell .page-container { padding: 18px 24px 40px; }
  .workspace-study-steps { gap: 9px; }
  #app-shell .dashboard-heading-actions { flex-wrap: wrap; }
}
@media (max-width: 980px) {
  #app-shell .sidebar { z-index: 55; transform: translateX(-100%); transition: transform .2s ease; }
  #app-shell .sidebar.is-open { transform: translateX(0); }
  #app-shell .main-nav { scrollbar-width: none; }
  #app-shell .main-nav::-webkit-scrollbar { display: none; width: 0; height: 0; }
  #app-shell .app-main { margin-left: 0; }
  #app-shell .topbar { padding: 0 22px; }
  #app-shell .analysis-scope-bar { padding: 10px 24px 0; }
  #app-shell .mobile-menu { display: grid; }
}
@media (max-width: 760px) {
  #app-shell .topbar,
  #app-shell[data-insight-page="true"] .topbar {
    height: auto;
    min-height: 92px;
    flex-wrap: wrap;
    align-content: center;
    gap: 5px 8px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  #app-shell .mobile-menu { order: 0; flex: 0 0 36px; }
  #app-shell .topbar-title { order: 1; flex: 1 1 auto; margin: 0; }
  #app-shell .topbar-actions { order: 2; margin-left: auto; }
  #app-shell .topbar .workspace-source { order: 3; flex: 1 0 100%; width: 100%; min-width: 0; max-width: none; min-height: 34px; margin: 0; }
  #app-shell .workspace-source #workspace-source-info:not(:empty) { max-width: min(220px, 33vw); }
}
@media (max-width: 640px) {
  #app-shell .topbar { padding-left: 14px; padding-right: 14px; }
  #app-shell .topbar-title { font-size: 12px; gap: 5px; }
  #app-shell .topbar-title strong { font-size: 17px; }
  #app-shell .topbar-title > span, #app-shell .changelog-trigger { display: none; }
  #app-shell .topbar-actions { gap: 5px; }
  #app-shell .topbar-import { min-height: 34px; padding: 5px 9px; font-size: 13px; white-space: nowrap; }
  #app-shell .topbar .workspace-source { flex-wrap: nowrap; gap: 6px; padding: 0; }
  #app-shell .workspace-source label { font-size: 12px; }
  #app-shell .workspace-source select { flex: 1 1 120px; width: auto; min-width: 108px; max-width: 175px; font-size: 13px; }
  #app-shell .workspace-source #workspace-source-info:not(:empty) { flex: 0 1 105px; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 0; font-size: 11px; }
  #app-shell .page-container { padding: 16px 16px 32px; }
  #app-shell .analysis-scope-bar { padding: 8px 16px 0; }
  #app-shell .analysis-scope-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  #app-shell .analysis-scope-summary-card { grid-row: 2; grid-column: 1 / -1; }
  #app-shell .analysis-scope-inner:has(.analysis-scope-field[hidden]) .analysis-scope-summary-card { grid-row: 1; grid-column: 1; }
  #app-shell .dashboard-heading h1 { font-size: 22px; }
  #app-shell .dashboard-heading { align-items: flex-start; }
  #app-shell .dashboard-heading-actions { justify-content: flex-start; }
  #app-shell .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #app-shell .dashboard-kpi-grid article { border-bottom: 1px solid var(--line); }
  #app-shell .dashboard-kpi-grid article > strong { font-size: 24px; }
  #app-shell #page-home .dashboard-primary-metrics { grid-template-columns: 1fr; }
  #app-shell #page-home .dashboard-primary-metrics article { min-height: 92px; border-right: 0; }
  #app-shell #page-home .dashboard-primary-metrics article:last-child { border-bottom: 0; grid-column: auto; }
  .dashboard-interaction-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-study-guide { padding: 14px; }
  .workspace-study-guide p { line-height: 1.8; }
  .workspace-study-steps { width: 100%; justify-content: space-between; }
  .workspace-planned-heading { flex-direction: column; gap: 13px; }
  .workspace-research-question { padding: 22px; }
  .workspace-research-question h2 { font-size: 19px; }
  .workspace-method-grid, .workspace-data-contract { grid-template-columns: 1fr; }
  .workspace-method-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace-method-grid article:last-child { border-bottom: 0; }
  .workspace-planned-footer { flex-direction: column; align-items: flex-start; }
  .workspace-command-results button { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  #app-shell .sidebar { transition: none; }
}

/* Keep the analysis entry focused on its findings; shared data controls stay available. */
#app-shell[data-insight-page="true"] .topbar { height: 64px; min-height: 64px; }
#app-shell[data-insight-page="true"] #breadcrumb-parent,
#app-shell[data-insight-page="true"] .prototype-note,
#app-shell[data-insight-page="true"] .changelog-trigger { display: none; }
#app-shell[data-insight-page="true"] .archive-preview-notice { padding-top: 5px; padding-bottom: 5px; background: #f7f3ec; border-bottom-color: #eae0cf; color: #817463; }
#app-shell[data-insight-page="true"] .archive-preview-notice .button { min-height: 24px; padding: 2px 0; border: 0; background: transparent; }
#app-shell[data-insight-page="true"] .analysis-scope-bar { padding-top: 9px; padding-bottom: 0; }
#app-shell[data-insight-page="true"] .analysis-scope-inner { grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; }
#app-shell[data-insight-page="true"] .analysis-scope-inner:has(.analysis-scope-field[hidden]) { grid-template-columns: minmax(0, 1fr) auto; }
#app-shell[data-insight-page="true"] .analysis-scope-field { display: flex; grid-column: auto; grid-row: auto; align-items: center; gap: 10px; min-width: 0; }
#app-shell[data-insight-page="true"] .analysis-scope-field[hidden] { display: none; }
#app-shell[data-insight-page="true"] .analysis-scope-field > span { flex-shrink: 0; font-size: 12px; }
#app-shell[data-insight-page="true"] .analysis-scope-field .searchable-filter { flex: 1; max-width: 440px; }
#app-shell[data-insight-page="true"] .analysis-scope-field .searchable-filter-trigger { height: 32px; border-radius: 7px; background: #fff; border-color: var(--line-strong); font-weight: 500; }
#app-shell[data-insight-page="true"] .analysis-scope-field .batch-scope-panel { left: 0; right: auto; width: min(720px, calc(100vw - 68px)); }
#app-shell[data-insight-page="true"] .analysis-scope-summary-card { grid-row: auto; grid-column: auto; }
#app-shell[data-insight-page="true"] .analysis-scope-summary-card p { margin: 0; white-space: nowrap; }
#app-shell[data-insight-page="true"] .analysis-scope-filters { padding-top: 14px; margin-top: 10px; }
#app-shell[data-insight-page="true"] .analysis-scope-filter-heading > div > span,
#app-shell[data-insight-page="true"] .analysis-scope-sync-note { display: none; }
@media (max-width: 640px) {
  #app-shell[data-insight-page="true"] .analysis-scope-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  #app-shell[data-insight-page="true"] .analysis-scope-field:not([hidden]) { grid-row: 1; grid-column: 1 / -1; }
  #app-shell[data-insight-page="true"] .analysis-scope-field:not([hidden]) ~ .analysis-scope-summary-card { grid-row: 2; grid-column: 1; }
  #app-shell[data-insight-page="true"] .analysis-scope-field:not([hidden]) ~ .analysis-scope-actions { grid-row: 2; grid-column: 2; }
  #app-shell[data-insight-page="true"] .analysis-scope-inner:has(.analysis-scope-field[hidden]) .analysis-scope-summary-card { grid-row: 1; grid-column: 1; }
  #app-shell[data-insight-page="true"] .analysis-scope-field > span { display: none; }
  #app-shell[data-insight-page="true"] .analysis-scope-actions { gap: 6px; }
  #app-shell[data-insight-page="true"] .analysis-scope-actions .button { padding: 6px 8px; }
  #app-shell[data-insight-page="true"] .analysis-scope-actions svg { display: none; }
  #app-shell[data-insight-page="true"] .analysis-scope-field .batch-scope-panel { width: calc(100vw - 32px); }
  #app-shell[data-insight-page="true"] .archive-preview-notice { align-items: center; gap: 8px; font-size: 12px; }
  #app-shell[data-insight-page="true"] .archive-preview-notice strong { display: none; }
}

/* Shared controls and evidence keep the palette when loaded by other modules. */
html #app-shell .archive-preview-notice,
html #app-shell[data-insight-page="true"] .archive-preview-notice { color: #756c58; background: #f9f6e9; border-bottom-color: #ebe6d0; }
html #app-shell .analysis-scope-icon { color: var(--accent-dark); background: var(--accent-soft); }
html #app-shell .user-chip .avatar { color: #13513d; background: #d2e8d7; }
html #app-shell .analysis-scope-bar :is(select, input, .searchable-filter-trigger) { color: var(--ink-2); border-color: var(--line-strong); font-size: 14px; background-color: #fff; }
html #app-shell .analysis-scope-summary-card p { color: var(--muted); }
html #app-shell .analysis-scope-actions .text-button { color: var(--accent-dark); font-size: 13px; }
html #app-shell :is(.searchable-filter-option:hover, .searchable-filter-option.is-selected, .batch-scope-source.is-active) { background: var(--accent-soft); color: var(--accent-dark); }
html #app-shell :is(.text-button, .row-action) { color: var(--accent-dark); }
html #app-shell :is(button, input, select, summary, a):focus-visible { outline-color: #6fae8c; }
html #app-shell .video-library-intro p,
html #app-shell :is(.video-library-scope-note, .video-library-results-heading p, .video-library-data-note, .video-library-data-note summary, .video-library-sort, .video-library-filter-row > label, .video-library-pagination, .video-sample-description) { color: var(--muted); font-size: 14px; }
html #app-shell .video-library-feedback:not(.is-error):not(.is-success) { color: var(--ink-2); border-color: var(--line); background: var(--surface-soft); font-size: 14px; }
html #app-shell :is(.video-library-stat, .video-library-filters, .video-sample-card, .video-library-data) { border-color: var(--line); color: var(--ink-2); background: #fff; }
html #app-shell .video-library-stat:hover,
html #app-shell .video-sample-card:hover { border-color: #a9cab0; background: #fff; }
html #app-shell .video-library-stat.is-active { border-color: #79a98b; box-shadow: none; background: #f2f9f3; }
html #app-shell .video-library-stat.is-active::after,
html #app-shell .video-library-stat.is-active > span { color: var(--accent-dark); }
html #app-shell :is(.video-library-stat > strong, .video-library-results-heading h2, .video-sample-content h3, .video-sample-metrics dd) { color: var(--ink); }
html #app-shell .video-library-stat > span { font-size: 14px; }
html #app-shell .video-library-stat > small { color: var(--muted); font-size: 12px; }
html #app-shell :is(.video-library-search-row .search-field, .video-library-filters select, .video-library-pagination select) { border-color: var(--line-strong); color: var(--ink-2); font-size: 14px; }
html #app-shell .video-library-search-row .search-field input { font-size: 14px; }
html #app-shell #page-videos .button { font-size: 14px; }
html #app-shell .video-library-filter-row .text-button { color: var(--accent-dark); font-size: 14px; }
html #app-shell :is(.video-library-filter-label, .video-sample-metrics, .video-library-chips) { border-color: var(--line); }
html #app-shell .video-library-filter-label { color: var(--muted); }
html #app-shell .video-library-chips button { color: var(--accent-dark); border-color: #cfe2d3; background: var(--accent-soft); font-size: 14px; }
html #app-shell .video-library-view { background: #edf3ed; border-color: var(--line); }
html #app-shell .video-library-view button { color: var(--muted); font-size: 14px; }
html #app-shell .video-library-view button[aria-pressed="true"] { color: var(--accent-dark); border-color: var(--line); background: #fff; box-shadow: none; }
html #app-shell :is(.video-sample-card-top, .video-library-table th) { background: #f7faf7; border-color: var(--line); color: var(--muted); }
html #app-shell .video-library-table { font-size: 14px; }
html #app-shell .video-library-table th { font-size: 14px; }
html #app-shell :is(.video-sample-platform, .video-sample-creator, .video-sample-product, .video-sample-product > strong, .video-sample-metrics dt, .video-sample-id) { color: var(--muted); font-size: 12px; }
html #app-shell .video-sample-creator strong { color: var(--ink-2); font-size: 14px; }
html #app-shell .video-sample-platform > span { color: var(--accent-dark); background: var(--accent-soft); }
html #app-shell .video-sample-footer .row-action { color: var(--accent-dark); font-size: 14px; }
html #app-shell .video-library-scope-note > span:first-child::before { background: #74a886; }
html #app-shell .video-library-empty-icon { color: var(--accent-dark); background: var(--accent-soft); }
html #app-shell .video-library-empty h3 { color: var(--ink); }
html #app-shell .video-library-empty p { color: var(--muted); font-size: 14px; }
html #app-shell #page-videos :is(button, input, select, summary, [tabindex]):focus-visible { outline-color: #6fae8c; }
html .detail-drawer { color: var(--ink); background: #fff; box-shadow: -8px 0 28px #1726201a; }
html .detail-drawer :is(.field-item dd, .archive-field-grid dd, .archive-batch-list p, .metric-history-empty p, .drawer-head p, .archive-version-line strong, .archive-history-table, .button) { font-size: 14px; line-height: 1.8; }
html .detail-drawer :is(.field-item dt, .archive-field-grid dt, .archive-metric-grid span, .archive-version-line > div > span) { color: var(--muted); font-size: 13px; }
html .detail-drawer .field-section h3 { font-size: 16px; }
html .detail-drawer .archive-field-grid > div { background: #fff; }
html .detail-drawer :is(.archive-version-line, .archive-metric-grid > div) { background: #f3f7f2; }
html .detail-drawer .button-primary { color: #fff; border-color: var(--accent); background: var(--accent); }
html .detail-drawer .button-primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
html .workspace-command { color: var(--ink); border-color: var(--line-strong); box-shadow: 0 12px 40px #17262024; }
html .workspace-command input { color: var(--ink); border-color: var(--line-strong); background: #fff; }
html .workspace-command-results button:hover,
html .workspace-command-results button:focus-visible { background: var(--accent-soft); }
@media (max-width: 640px) {
  html #app-shell .analysis-scope-inner { gap: 8px; }
  html #app-shell .analysis-scope-actions .text-button { font-size: 12px; }
  html #app-shell .archive-preview-notice { font-size: 12px; }
  html #app-shell .archive-preview-notice .button { font-size: 12px; }
  html .detail-drawer .archive-field-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  #app-shell[data-insight-page="true"] .topbar { height: auto; min-height: 92px; }
  #app-shell[data-workspace="kol"] .topbar { height: 64px; min-height: 64px; flex-wrap: nowrap; }
}

/* The published site has only versioned read-only snapshots. Keep all analysis
   controls while removing actions that require a live API or account session. */
#app-shell[data-static-showcase="true"] [data-workspace-video-nav] > .workspace-nav-group:nth-child(2),
#app-shell[data-static-showcase="true"] [data-workspace-video-nav] > .workspace-nav-group[data-admin-only],
#app-shell[data-static-showcase="true"] :is([data-go-create], [data-navigate="upload"], [data-navigate="shop"],
  [data-navigate="resources"], [data-navigate="processing"], [data-navigate="tasks"], [data-navigate="create"],
  #preview-login-button, .metric-refresh-control,
  #video-library-refresh, #run-metric-refresh, #export-button, [data-refresh-one-video], [data-retry-repair-video],
  [data-batch-action]:not([data-batch-action="open_results"])) {
  display: none !important;
}
