body.command-view-open {
  overflow: hidden;
}
body.command-view-open .office-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: 100%;
  height: 100dvh;
  min-height: 0;
}
body.command-view-open .office-panel > :not(.office-canvas, .interaction-layer),
body.command-view-open .office-people-overlay {
  visibility: hidden;
}
body.command-view-open .office-panel .office-canvas {
  inset: 0;
  transform: translateY(4.9%) scale(1.17);
  filter: saturate(0.7) brightness(1.08);
}
body.command-view-open .interaction-layer {
  pointer-events: auto;
  background: linear-gradient(120deg, #c9e1e81c, #e3eff42a);
}
.display-housing {
  position: absolute;
  inset: 6.5% 6.25% 12.2%;
  padding: 9px 10px 13px;
  border: 1px solid #f7ffff;
  border-radius: 23px;
  background: linear-gradient(
    129deg,
    #e0f6fa8c,
    #91c7ce3b 32%,
    #f5ffff86 65%,
    #a8d0d0b0
  );
  box-shadow:
    inset 0 2px #fff9,
    inset 3px 0 2px #f0ffffc2,
    inset 0 -3px 0 #81b2bcce,
    0 4px 0 #5c8a928a,
    0 20px 40px #12283466;
  backdrop-filter: blur(2px);
  pointer-events: auto;
}
.command-screen {
  --ink: #183236;
  --dim: #39555c;
  --accent: #007866;
  --state: var(--accent);
  --line: #6586954d;
  --panel: linear-gradient(112deg, #ffffff82, #f6ffff5d);
  color-scheme: light;
  color: var(--ink);
  font:
    16px "PingFang SC",
    "Helvetica Neue",
    sans-serif;
  isolation: isolate;
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: clamp(54px, 7.2dvh, 76px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #f6ffffc9;
  border-radius: 13px;
  background: linear-gradient(111deg, #eaf8f7c9, #f1faf7a8 48%, #d9eff0ba);
  backdrop-filter: blur(5px);
}
.command-screen::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      117deg,
      transparent 0 17%,
      #ffffff22 17.4%,
      #fff1 36%,
      transparent 50%
    ),
    radial-gradient(ellipse at top right, #c6fff04d, transparent 50%);
}
.command-screen[data-tone="amber"] {
  --state: #815415;
}
.command-screen[data-tone="red"] {
  --state: #984536;
}
.command-screen :is(h2, h3, h4, p, ol, dl, dd) {
  margin: 0;
}
.command-header {
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(16px, 2vw, 32px);
  background: #ffffff48;
}
.command-header h2 {
  font-size: clamp(18px, 1.5vw, 25px);
  font-weight: 570;
  letter-spacing: 0.06em;
}
.screen-icon {
  height: 20px;
  width: 24px;
  border: 1.5px solid #116e66;
  border-radius: 4px;
  position: relative;
}
.screen-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-left: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
}
.screen-icon::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 7px;
  right: 7px;
  height: 1px;
  background: var(--accent);
}
.command-runline {
  margin-left: auto;
  margin-right: 9px;
  color: var(--dim);
  font-size: 15px;
}
.command-header-actions {
  display: flex;
  gap: 13px;
}
.command-screen button {
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.04em;
  background: #f8ffff42;
  border: 1px solid #60848b6e;
  border-radius: 7px;
  padding: 8px 14px;
}
.command-screen button:hover {
  background: #ffffffe0;
}
.command-screen :focus-visible {
  outline-color: var(--accent);
}
.command-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) clamp(
      160px,
      14vw,
      240px
    );
  grid-template-rows: minmax(0, 0.95fr) minmax(0, 1.2fr);
  grid-template-areas: "hero budget steps" "chart chart steps";
  gap: 15px;
  padding: clamp(13px, 2.3dvh, 24px) clamp(15px, 1.69vw, 28px)
    clamp(12px, 2.1dvh, 22px);
}
.has-trial .command-layout {
  grid-template-rows: minmax(0, 0.95fr) minmax(0, 1.2fr) clamp(
      67px,
      9.1dvh,
      100px
    );
  grid-template-areas: "hero budget steps" "chart chart steps" "kpis kpis steps";
}
.command-layout > * {
  min-height: 0;
  min-width: 0;
}
.command-verdict {
  grid-area: hero;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: clamp(4px, 1.25vw, 20px);
}
.command-phase {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--state);
  font-weight: 580;
}
.command-phase i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--state);
  box-shadow: 0 0 9px #00786644;
}
.command-value {
  font:
    500 clamp(50px, min(6.5vw, 11dvh), 112px) / 1.04 "Helvetica Neue",
    Arial,
    sans-serif;
  letter-spacing: -0.035em;
  margin: 8px 0;
  color: #173c3c;
  overflow-wrap: anywhere;
}
.command-value small,
.trial-readouts small {
  font:
    400 18px "PingFang SC",
    sans-serif;
  color: var(--dim);
  letter-spacing: 0;
  margin-left: 12px;
}
.command-value.text-value {
  font-size: clamp(30px, 4vw, 60px);
}
.command-product {
  font-size: clamp(16px, 1.25vw, 21px);
  font-weight: 550;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.command-product small {
  display: inline-block;
  font:
    13px Menlo,
    monospace;
  color: var(--dim);
  margin-left: 10px;
  white-space: nowrap;
}
.command-budget {
  grid-area: budget;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 1.25vw, 22px);
}
.command-budget h3,
.command-analysis h3,
.command-rail h3 {
  font-size: clamp(16px, 1.2vw, 20px);
  font-weight: 560;
}
.budget-ring {
  width: clamp(82px, min(8vw, 14dvh), 140px);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  background: radial-gradient(closest-side, #eafaf591 68%, transparent 71%);
}
.budget-ring::before,
.budget-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: conic-gradient(
    from 220deg,
    var(--accent) 0 var(--sweep),
    #315e631c var(--sweep) 280deg,
    transparent 280deg
  );
  mask: radial-gradient(closest-side, transparent 89%, black 90%);
}
.budget-ring::after {
  inset: -3px;
  opacity: 0.6;
  background: repeating-conic-gradient(
    from 220deg,
    var(--accent) 0 1deg,
    transparent 1.2deg 8deg
  );
  mask: radial-gradient(closest-side, transparent 96%, black 97%);
}
.budget-ring strong {
  color: #17564f;
  font:
    560 clamp(18px, 1.75vw, 30px) "Helvetica Neue",
    sans-serif;
  letter-spacing: -0.046em;
  font-variant-numeric: tabular-nums;
}
.budget-ring small {
  font-size: 0.51em;
  margin-left: 2px;
}
.command-screen .budget-amount {
  margin: 12px 0 4px;
  font:
    530 clamp(18px, 1.7vw, 29px) "Helvetica Neue",
    sans-serif;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.budget-limit,
.analysis-heading > span,
.trial-readouts dt {
  color: var(--dim);
  font-size: 15px;
}
.command-analysis,
.command-rail,
.trial-readouts {
  background: var(--panel);
  border: 1px solid #ffffffd1;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px #608b8c31,
    inset 0 1px #fff7;
}
.command-analysis {
  grid-area: chart;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: clamp(12px, 1.8dvh, 19px) clamp(13px, 1.38vw, 24px) 9px;
}
.analysis-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.demand-chart {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.trial-readouts {
  grid-area: kpis;
  display: flex;
  align-items: center;
  padding: 0 clamp(13px, 1.5vw, 25px);
}
.trial-readouts div {
  min-width: 0;
  flex: 1;
}
.trial-readouts div + div {
  border-left: 1px solid var(--line);
  padding-left: clamp(10px, 1.45vw, 24px);
}
.trial-readouts dd {
  margin-top: 5px;
  font:
    550 clamp(22px, 2.06vw, 36px) "Helvetica Neue",
    sans-serif;
  color: #174942;
  font-variant-numeric: tabular-nums;
}
.trial-readouts small {
  font-size: 14px;
  margin-left: 4px;
}
.command-rail {
  grid-area: steps;
  padding: clamp(17px, 2.4dvh, 26px) clamp(12px, 1.32vw, 22px);
}
.command-rail ol {
  list-style: none;
  padding: 0;
  margin-top: clamp(20px, 4.3dvh, 45px);
}
.command-stage {
  position: relative;
  padding: 0 0 clamp(17px, 5.3dvh, 54px) 24px;
}
.command-stage:last-child {
  padding-bottom: 0;
}
.command-stage::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 1px;
  width: 8px;
  height: 8px;
  border: 1.4px solid #6c8689;
  border-radius: 50%;
}
.command-stage.done::before,
.command-stage.completed::before {
  border-color: var(--accent);
}
.command-stage.active::before {
  background: var(--state);
  border-color: var(--state);
  box-shadow: 0 0 9px #00786655;
}
.command-stage:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 19px;
  bottom: -4px;
  left: 5.5px;
  width: 1px;
  background: var(--line);
}
.command-stage h4 {
  font-size: 16px;
  font-weight: 500;
}
.command-stage.active h4 {
  color: var(--state);
  font-weight: 600;
}
.command-stage span {
  display: block;
  color: var(--dim);
  font-size: 13px;
  margin-top: 3px;
}
.command-screen .command-empty {
  grid-row: 1/-1;
  display: grid;
  place-items: center;
  color: var(--dim);
}
.command-rail-empty {
  color: var(--dim);
  font-size: 14px;
}
.candidate-ranking {
  display: grid;
  align-content: space-evenly;
  gap: 6px;
}
.candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.candidate-name {
  min-width: 0;
}
.candidate-name strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.candidate-track {
  background: #497f7c29;
  height: 5px;
  border-radius: 3px;
  margin-top: 7px;
  overflow: hidden;
}
.candidate-track i {
  height: 100%;
  display: block;
  background: #72a6a1;
}
.chosen .candidate-track i {
  background: #007866;
}
.candidate-score {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}
.chosen .candidate-score {
  color: var(--accent);
}
.command-details {
  position: absolute;
  z-index: 3;
  top: clamp(54px, 7.2dvh, 76px);
  right: 14px;
  bottom: 14px;
  width: min(420px, calc(100% - 28px));
  overflow: auto;
  padding: 17px 22px;
  border: 1px solid #7aa39f;
  border-radius: 12px;
  background: #f2faf8f5;
  box-shadow: 0 10px 30px #183a4b38;
  backdrop-filter: blur(12px);
  font-size: 14px;
}
.command-details header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.command-details dt {
  color: #42665f;
  margin: 17px 0 4px;
  font-weight: 650;
}
.command-details dd {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.command-details a {
  color: #006559;
  text-decoration: underline;
}
@media (max-width: 1000px) and (min-width: 761px) {
  .command-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 128px;
    gap: 10px;
  }
  .command-budget {
    gap: 9px;
  }
  .budget-ring {
    width: 70px;
  }
  .command-stage {
    padding-left: 18px;
  }
  .command-product small {
    margin-left: 0;
  }
}
@media (min-width: 761px) and (max-height: 610px) {
  .command-layout,
  .has-trial .command-layout {
    overflow: auto;
    grid-template-rows: minmax(140px, 0.95fr) minmax(160px, 1.2fr);
  }
  .has-trial .command-layout {
    grid-template-rows: minmax(140px, 0.95fr) minmax(160px, 1.2fr) 66px;
  }
}
@media (max-width: 760px) {
  .display-housing {
    inset: 5% 3.5% 8%;
    padding: 4px 4px 8px;
    border-radius: 14px;
  }
  .command-screen {
    border-radius: 10px;
    grid-template-rows: 51px minmax(0, 1fr);
  }
  .command-header {
    gap: 6px;
    padding: 0 10px;
  }
  .command-header h2 {
    font-size: 15px;
    letter-spacing: 0;
  }
  .screen-icon {
    width: 16px;
    height: 14px;
  }
  .command-runline {
    display: none;
  }
  .command-header-actions {
    margin-left: auto;
    gap: 5px;
  }
  .command-screen button {
    font-size: 12px;
    padding: 6px 8px;
  }
  .command-layout,
  .has-trial .command-layout {
    overflow: auto;
    align-content: start;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    grid-template-rows: auto 195px auto;
    grid-template-areas: "hero budget" "chart chart" "steps steps";
    gap: 11px;
    padding: 14px 10px 12px;
  }
  .has-trial .command-layout {
    grid-template-rows: auto 195px auto auto;
    grid-template-areas: "hero budget" "chart chart" "kpis kpis" "steps steps";
  }
  .command-verdict {
    padding: 6px 0 8px 3px;
  }
  .command-phase {
    font-size: 12px;
    gap: 5px;
  }
  .command-phase i {
    width: 6px;
    height: 6px;
  }
  .command-value,
  .command-value.text-value {
    font-size: clamp(28px, 9vw, 61px);
    letter-spacing: -0.04em;
  }
  .command-value small {
    font-size: 13px;
    margin-left: 4px;
  }
  .command-product {
    font-size: 13px;
  }
  .command-product small {
    display: block;
    font-size: 10px;
    margin: 3px 0 0;
  }
  .command-budget {
    flex-direction: column;
    gap: 7px;
    padding: 4px;
    text-align: center;
  }
  .budget-ring {
    width: 64px;
  }
  .budget-ring strong {
    font-size: 16px;
  }
  .command-budget h3 {
    font-size: 12px;
  }
  .command-screen .budget-amount {
    font-size: 17px;
    margin: 2px 0;
  }
  .budget-limit {
    font-size: 11px;
  }
  .command-analysis {
    gap: 3px;
    padding: 11px 10px 4px;
  }
  .command-analysis h3,
  .command-rail h3 {
    font-size: 15px;
  }
  .analysis-heading > span {
    font-size: 12px;
  }
  .trial-readouts {
    padding: 10px;
  }
  .trial-readouts dt {
    font-size: 12px;
  }
  .trial-readouts dd {
    font-size: 21px;
  }
  .trial-readouts small {
    font-size: 11px;
  }
  .command-rail {
    padding: 12px;
  }
  .command-rail ol {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 12px;
    gap: 4px;
  }
  .command-stage {
    padding: 14px 0 0;
  }
  .command-stage::before {
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
  }
  .command-stage:not(:last-child)::after {
    left: 12px;
    right: 3px;
    top: 3px;
    bottom: auto;
    height: 1px;
    width: auto;
  }
  .command-stage h4 {
    font-size: 13px;
  }
  .command-stage span {
    font-size: 11px;
  }
  .command-rail-empty {
    grid-column: 1/-1;
  }
  .command-details {
    top: 52px;
    bottom: 7px;
    right: 7px;
    width: calc(100% - 14px);
  }
}

/* In WebGL the canvas is the display. Keep the accessible data and use
   the existing dialog for the two controls and the optional details sheet. */
body.physical-board-view .office-panel .office-canvas {
  transform: none;
  filter: none;
}
body.physical-board-view .interaction-layer { background: transparent; }
.physical-board-view .display-housing,
.physical-board-view .command-screen {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  padding: 0;
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}
.physical-board-view .command-screen::before,
.physical-board-view .screen-icon { display: none; }
.physical-board-view .command-header {
  position: absolute;
  inset: max(12px, env(safe-area-inset-top)) 18px auto auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.physical-board-view :is(.command-layout, #dashboard-title, .command-runline) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  padding: 0;
  margin: 0;
  border: 0;
}
.physical-board-view .command-header-actions,
.physical-board-view .command-details { pointer-events: auto; }
.physical-board-view .board-close {
  background: #14252df0;
  border: 1px solid #8ba8a9;
  color: #e5f3ef;
}
.physical-board-view .command-details { right: 18px; top: 66px; }
.sourcing-panel { border-top: 1px solid #30404b; padding: 14px 0; }
.sourcing-panel summary { cursor: pointer; font-weight: 600; }
#sourcing-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(65px, 1fr); gap: 8px; margin: 14px 0 8px; }
#sourcing-form label { display: grid; gap: 4px; }
#sourcing-form input { width: 100%; min-width: 0; }
#sourcing-results { color: #c1cfda; font-size: 13px; }
#sourcing-results a { color: #98e6cd; }
