.office-panel > .section-title:has(> .run-report-button) { justify-content: flex-start; }
.office-panel .run-report-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  margin-inline-start: auto;
  padding: 9px 15px;
  border: 1px solid #ffac86;
  border-radius: 6px;
  background: var(--copper);
  color: #24160e;
  font: inherit;
  font-size: 13px;
  font-weight: 660;
  line-height: 1.25;
}
.office-panel .run-report-button:hover:enabled { background: #ffb390; }
.office-panel .run-report-button:disabled { opacity: .56; }
.office-panel .run-report-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

#inspector[data-type="run-report"] {
  --report-gutter: clamp(18px, 4vw, 40px);
  width: min(820px, calc(100vw - 32px));
  max-height: min(90vh, 940px);
  max-height: min(90dvh, 940px);
  padding: 0;
  overflow: hidden;
  background: var(--panel);
}
#inspector[data-type="run-report"][open] {
  display: grid;
  grid-template: "meta close" auto "title close" auto "text text" minmax(0, 1fr) / minmax(0, 1fr) auto;
}
#inspector[data-type="run-report"] > header { display: contents; }
#inspector[data-type="run-report"] .dialog-label {
  grid-area: meta;
  padding: 17px 0 0 var(--report-gutter);
  color: var(--muted);
  line-height: 1.5;
  letter-spacing: .025em;
  overflow-wrap: anywhere;
}
#inspector[data-type="run-report"] > header .icon-only {
  grid-area: close;
  align-self: center;
  margin: 8px var(--report-gutter) 8px 8px;
  min-width: 44px;
  min-height: 44px;
}
#inspector[data-type="run-report"] > h2 {
  grid-area: title;
  align-self: center;
  margin: 0;
  padding: 3px 0 16px var(--report-gutter);
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 650;
  letter-spacing: -.034em;
  overflow-wrap: anywhere;
}
#inspector[data-type="run-report"] > .dialog-body {
  grid-area: text;
  min-height: 0;
  padding: clamp(18px, 3vw, 28px) var(--report-gutter) 32px;
  border-top: 1px solid var(--line);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--panel);
}
#inspector[data-type="run-report"] > .dialog-body:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: -3px;
}

.run-report { min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.run-report-summary {
  padding: 2px 0 3px 16px;
  border-left: 3px solid var(--copper);
}
.run-report .run-report-summary small {
  display: block;
  color: var(--muted);
  font: 500 12px/1.5 var(--mono);
  font-variant-numeric: tabular-nums;
}
.run-report .run-report-summary h3 {
  margin: 4px 0 8px;
  font-size: clamp(21px, 3.3vw, 28px);
  line-height: 1.22;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.run-report .run-report-summary p,
.run-report .run-report-row p,
.run-report .run-report-note {
  max-width: 72ch;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.62;
}
.run-report :is(.run-report-summary, .run-report-row) p + p { margin-top: .5em; }
.run-report .run-report-stages {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: report-step;
}
.run-report-stage {
  position: relative;
  min-width: 0;
  padding: 23px 0 24px 36px;
  border-top: 1px solid var(--line);
  counter-increment: report-step;
}
.run-report-stage:last-child { padding-bottom: 0; }
.run-report-stage::before {
  position: absolute;
  top: 26px;
  left: 0;
  content: counter(report-step, decimal-leading-zero);
  color: var(--muted);
  font: 500 12px/1.5 var(--mono);
  font-variant-numeric: tabular-nums;
}
.run-report-stage h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 640;
  line-height: 1.4;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.run-report .run-report-note { margin-top: 7px; color: var(--muted); }
.run-report .run-report-actors { margin: 12px 0 0; }
.run-report-row {
  display: grid;
  grid-template-columns: minmax(112px, 21%) minmax(0, 1fr);
  gap: 18px;
  padding-top: 12px;
}
.run-report-row + .run-report-row {
  margin-top: 12px;
  border-top: 1px solid var(--faint);
}
.run-report-row :is(dt, dd) { margin: 0; min-width: 0; }
.run-report-row dt { color: var(--muted); font-size: 13px; line-height: 1.45; }
.run-report-row dt b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 600;
}
.run-report-row dd { font-size: 15px; line-height: 1.62; }

@media (max-width: 600px) {
  #inspector[data-type="run-report"] {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
  #inspector[data-type="run-report"] > header .icon-only { margin-right: 10px; }
  .office-panel > .section-title:has(> .run-report-button) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
  }
  .office-panel > .section-title:has(> .run-report-button) h2 { grid-column: 1; grid-row: 1; }
  .office-panel > .section-title:has(> .run-report-button) .tag { grid-column: 1; grid-row: 2; justify-self: start; }
  .office-panel .run-report-button { grid-column: 2; grid-row: 1 / span 2; min-height: 44px; }
  .run-report-stage { padding: 19px 0; }
  .run-report-stage h4 { padding-left: 28px; font-size: 18px; }
  .run-report-stage::before { top: 23px; }
  .run-report-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .run-report-row dt b { display: inline; margin: 0 .5em 0 0; }
}
