.workspace-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 16px;
  margin: 22px 0;
}

.workspace-chart-card,
.workspace-reliability-card {
  border: 1px solid #ddd8d0;
  border-radius: 18px;
  background: #fff;
  padding: 20px;
}

.workspace-chart-card > header,
.workspace-reliability-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.workspace-chart-card > header span {
  color: #6d5de7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.workspace-chart-card h3,
.workspace-reliability-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
  line-height: 1.05;
  margin: 5px 0 0;
}

.workspace-chart-card h3 { font-size: 23px; }
.workspace-chart-card header small { color: #77717e; font-size: 11px; text-align: right; }

.workspace-chart-empty {
  border: 1px dashed #d7d1c9;
  border-radius: 12px;
  color: #706a75;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  padding: 16px;
}

.confidence-rows,
.reliability-rows {
  display: grid;
  gap: 13px;
}

.confidence-row,
.reliability-row {
  display: grid;
  grid-template-columns: minmax(120px, .9fr) minmax(150px, 2fr) 42px;
  align-items: center;
  gap: 12px;
}

.confidence-row > span,
.reliability-row > span {
  color: #5f5964;
  font-size: 12px;
  font-weight: 700;
}

.confidence-row > strong,
.reliability-row > strong {
  font-size: 13px;
  text-align: right;
}

.workspace-chart-card progress,
.workspace-configuration-chart progress,
.workspace-reliability-card progress {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  background: #ece8e2;
  height: 13px;
  overflow: hidden;
  width: 100%;
}

.workspace-chart-card progress::-webkit-progress-bar,
.workspace-configuration-chart progress::-webkit-progress-bar,
.workspace-reliability-card progress::-webkit-progress-bar { background: #ece8e2; border-radius: 999px; }
.workspace-chart-card progress::-webkit-progress-value,
.workspace-configuration-chart progress::-webkit-progress-value,
.workspace-reliability-card progress::-webkit-progress-value { background: #aaa39b; border-radius: 999px; }
.workspace-chart-card progress::-moz-progress-bar,
.workspace-configuration-chart progress::-moz-progress-bar,
.workspace-reliability-card progress::-moz-progress-bar { background: #aaa39b; border-radius: 999px; }
.confidence-row.observed progress::-webkit-progress-value,
.configuration-bar-row.selected progress::-webkit-progress-value { background: #6f60eb; }
.confidence-row.observed progress::-moz-progress-bar,
.configuration-bar-row.selected progress::-moz-progress-bar { background: #6f60eb; }
.confidence-row.required progress::-webkit-progress-value { background: #201b25; }
.confidence-row.required progress::-moz-progress-bar { background: #201b25; }
.confidence-row.lower progress::-webkit-progress-value { background: #e49339; }
.confidence-row.lower progress::-moz-progress-bar { background: #e49339; }
.configuration-bar-row.passed progress::-webkit-progress-value,
.reliability-row.supported progress::-webkit-progress-value { background: #4eb889; }
.configuration-bar-row.passed progress::-moz-progress-bar,
.reliability-row.supported progress::-moz-progress-bar { background: #4eb889; }
.configuration-bar-row.failed progress::-webkit-progress-value,
.reliability-row.below progress::-webkit-progress-value { background: #d97e6c; }
.configuration-bar-row.failed progress::-moz-progress-bar,
.reliability-row.below progress::-moz-progress-bar { background: #d97e6c; }
.reliability-row.provisional progress::-webkit-progress-value { background: #7565ea; }
.reliability-row.provisional progress::-moz-progress-bar { background: #7565ea; }

.confidence-verdict {
  border-left: 3px solid #7565ea;
  color: #514b55;
  font-size: 12px;
  line-height: 1.5;
  margin: 17px 0 0;
  padding: 7px 0 7px 11px;
}

.confidence-verdict.supported { border-color: #4eb889; }
.confidence-verdict.below { border-color: #d97e6c; }

.funnel-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.funnel-flow li {
  background: #f6f3ee;
  border-radius: 11px;
  min-width: 0;
  padding: 12px 8px;
  position: relative;
  text-align: center;
}

.funnel-flow li:not(:last-child)::after {
  color: #948d98;
  content: "→";
  font-size: 18px;
  font-weight: 700;
  position: absolute;
  right: -15px;
  top: 18px;
}

.funnel-flow li.selected { background: #201b25; color: #fff; }
.funnel-flow strong { display: block; font-size: 22px; }
.funnel-flow span { display: block; font-size: 10px; margin-top: 2px; }
.funnel-note { color: #706a75; font-size: 11px; line-height: 1.45; margin: 13px 0 0; }

.workspace-configuration-chart {
  border: 1px solid #e2ddd6;
  border-radius: 15px;
  margin: 0 0 14px;
  padding: 16px;
}

.configuration-floor {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  color: #6d6870;
  font-size: 11px;
  margin: 0 0 9px;
}

.configuration-floor strong { color: #201b25; }
.configuration-bar-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 2fr) 48px;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

.configuration-bar-label { min-width: 0; }
.configuration-bar-label strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.configuration-bar-label small { color: #77717e; font-size: 10px; }
.configuration-bar-row.selected .configuration-bar-label small { color: #5e50cc; font-weight: 800; }
.configuration-bar-value { font-size: 12px; font-weight: 800; text-align: right; }
.configuration-more { color: #77717e; font-size: 11px; margin: 13px 0 0; }

.workspace-candidate-details {
  border: 1px solid #e2ddd6;
  border-radius: 14px;
  margin: 0 0 20px;
  overflow: hidden;
}

.workspace-candidate-details > summary {
  align-items: center;
  color: #514b55;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 750;
  justify-content: space-between;
  padding: 13px 16px;
}

.workspace-candidate-details > summary span { color: #817a84; font-size: 10px; font-weight: 650; }
.workspace-candidate-details[open] > summary { border-bottom: 1px solid #e2ddd6; }
.workspace-candidate-details .workspace-candidate-table { border: 0; border-radius: 0; margin: 0; }

.workspace-trend-card { margin-top: 20px; }
.workspace-trend-svg { display: block; height: auto; overflow: visible; width: 100%; }
.workspace-trend-svg .grid { stroke: #e6e1da; stroke-width: .6; }
.workspace-trend-svg .target-line { fill: none; stroke: #17131c; stroke-dasharray: 3 2; stroke-width: 1; }
.workspace-trend-svg .observed-line { fill: none; stroke: #7161ea; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.workspace-trend-svg .lower-line { fill: none; stroke: #e49339; stroke-dasharray: 2 2; stroke-width: 1.2; }
.workspace-trend-svg .point { fill: #7161ea; stroke: #fff; stroke-width: 1; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 9px; }
.trend-legend span { color: #6d6870; font-size: 11px; }
.trend-legend i { display: inline-block; height: 2px; margin: 0 5px 3px 0; width: 15px; }
.trend-legend .observed i { background: #7161ea; }
.trend-legend .target i { background: #17131c; }
.trend-legend .lower i { background: #e49339; }

.workspace-run-compare { margin-top: 16px; }
.workspace-run-selectors {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.workspace-run-selectors label { min-width: 0; }
.workspace-run-selectors label > span {
  color: #68616d;
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.workspace-run-selectors select {
  appearance: none;
  background: #f7f4f0;
  border: 1px solid #d9d3cc;
  border-radius: 10px;
  color: #211c25;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 42px;
  padding: 0 34px 0 11px;
  text-overflow: ellipsis;
  width: 100%;
}
.workspace-run-selectors select:focus-visible {
  border-color: #6f60eb;
  box-shadow: 0 0 0 3px rgb(111 96 235 / 18%);
  outline: 0;
}
.workspace-run-arrow { color: #8b8490; font-size: 18px; padding-bottom: 10px; }
.workspace-run-verdict {
  background: #211c25;
  border-radius: 14px;
  color: #fff;
  margin-top: 16px;
  padding: 17px 18px;
}
.workspace-run-verdict > span {
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  display: inline-block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  padding: 5px 8px;
  text-transform: uppercase;
}
.workspace-run-verdict > strong { display: block; font-size: 14px; line-height: 1.4; margin-top: 10px; }
.workspace-run-verdict ul { color: #d8d3dc; font-size: 11px; line-height: 1.45; margin: 8px 0 0; padding-left: 18px; }
.workspace-run-verdict.improved { background: #153d31; }
.workspace-run-verdict.regressed { background: #602c29; }
.workspace-run-verdict.tradeoff { background: #4a3820; }
.workspace-run-verdict.not-comparable { background: #313958; }
.workspace-run-verdict.no-material-change { background: #39323d; }
.workspace-run-verdict.no-material-change p { color: #ddd7e1; font-size: 11px; margin: 5px 0 0; }
.workspace-run-deltas {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1px;
  overflow: hidden;
}
.workspace-run-deltas article {
  background: #f5f2ee;
  min-width: 0;
  padding: 12px;
}
.workspace-run-deltas span { color: #756f79; display: block; font-size: 10px; }
.workspace-run-deltas strong { display: block; font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.workspace-run-warning {
  border-left: 3px solid #d99b47;
  color: #625b66;
  font-size: 11px;
  line-height: 1.5;
  margin: 15px 0;
  padding: 3px 0 3px 10px;
}
.workspace-local-compare {
  align-items: center;
  border-top: 1px solid #e2ddd6;
  display: grid;
  gap: 10px 14px;
  grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.4fr) auto;
  padding-top: 15px;
}
.workspace-local-compare strong { font-size: 12px; }
.workspace-local-compare p { color: #77717e; font-size: 10px; line-height: 1.4; margin: 3px 0 0; }
.workspace-local-compare code {
  background: #f4f1ed;
  border-radius: 8px;
  color: #4c4651;
  font-size: 10px;
  overflow: hidden;
  padding: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-reliability-card { margin: 18px 0 24px; padding: 24px; }
.workspace-reliability-card > header h2 { font-size: 27px; }
.workspace-reliability-card > header p { color: #6d6870; font-size: 13px; line-height: 1.45; margin: 4px 0 0; max-width: 360px; }
.reliability-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.reliability-row { grid-template-columns: minmax(125px, 1fr) minmax(100px, 1.4fr) 26px; }
.reliability-footnote { color: #746e78; font-size: 11px; line-height: 1.45; margin: 15px 0 0; }
.workspace-candidate-row { grid-template-columns: minmax(220px, 2fr) minmax(90px, .75fr) minmax(70px, .55fr) minmax(90px, .75fr) minmax(90px, .75fr) !important; }
.workspace-activity-evidence.below,
.workspace-evidence-pill.below { background: #fff0ec !important; border-color: #e7b1a6 !important; color: #a14333 !important; }

@media (max-width: 760px) {
  .workspace-insight-grid { grid-template-columns: 1fr; }
  .workspace-chart-card,
  .workspace-reliability-card { padding: 16px; }
  .workspace-chart-card > header,
  .workspace-reliability-card > header { display: block; }
  .workspace-chart-card header small { display: block; margin-top: 7px; text-align: left; }
  .confidence-row,
  .reliability-row { grid-template-columns: 110px minmax(90px, 1fr) 38px; gap: 8px; }
  .funnel-flow { gap: 12px; }
  .funnel-flow li { padding: 11px 3px; }
  .funnel-flow li:not(:last-child)::after { right: -11px; }
  .funnel-flow strong { font-size: 19px; }
  .funnel-flow span { font-size: 9px; }
  .configuration-bar-row { grid-template-columns: minmax(105px, 1fr) minmax(90px, 1.25fr) 38px; gap: 8px; }
  .workspace-run-selectors { align-items: stretch; grid-template-columns: 1fr; }
  .workspace-run-arrow { padding: 0; text-align: center; transform: rotate(90deg); }
  .workspace-run-deltas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-local-compare { align-items: stretch; grid-template-columns: 1fr; }
  .workspace-local-compare code { white-space: normal; word-break: break-all; }
  .workspace-local-compare .copy-command { justify-self: stretch; }
  .reliability-rows { grid-template-columns: 1fr; }
  .workspace-reliability-card > header p { margin-top: 8px; }
  .workspace-candidate-table { overflow-x: auto; }
  .workspace-candidate-row { grid-template-columns: minmax(190px, 2fr) 90px 70px 95px 95px !important; min-width: 620px; }
}
