.workspace-output-toggle {
  align-items: center;
  justify-content: space-between;
}

.workspace-output-toggle > [role="group"] {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.brief .workspace-output-toggle .sheet-proof-open {
  color: #1948c9;
  border-color: #949dae;
}

.sheet-proof {
  box-sizing: border-box;
  width: calc(100vw - clamp(16px, 3vw, 56px));
  height: calc(100dvh - clamp(18px, 4vh, 52px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid #94948e;
  background: #fff;
  color: #181818;
  overflow: hidden;
}

.sheet-proof[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.sheet-proof::backdrop { background: rgb(14 18 30 / 62%); }

.sheet-proof-head,
.sheet-proof-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  padding: 12px clamp(12px, 2vw, 27px);
  border-bottom: 1px solid #d8d8d4;
}

.sheet-proof-heading h2 {
  margin: 0;
  font-size: clamp(19px, 2.15vw, 29px);
  line-height: 1.25;
  letter-spacing: -.035em;
}

.sheet-proof-heading p {
  margin: 3px 0 0;
  color: #515151;
  font-size: 13px;
}

.sheet-proof-heading p:empty { display: none; }
.sheet-proof-toolbar { padding-block: 8px; }
.sheet-proof-toolbar .sheet-proof-zoom { margin-inline-start: auto; }

.sheet-proof-actions,
.sheet-proof-sheets,
.sheet-proof-zoom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.brief .sheet-proof button,
.brief .sheet-proof-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 36px;
  padding: 5px 11px;
  border: 1px solid #bdbebd;
  border-radius: 2px;
  color: #242424;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}

.brief .sheet-proof button:is(:hover, [aria-pressed="true"]) {
  color: #1948c9;
  border-color: #1948c9;
}

.brief .sheet-proof-sheets button[aria-pressed="true"],
.brief .sheet-proof-actions a:not(.sheet-proof-standalone) {
  color: #fff;
  border-color: #1948c9;
  background: #1948c9;
}

.brief .sheet-proof-actions .sheet-proof-standalone { color: #1948c9; border-color: #949dae; }
.brief .sheet-proof-actions .sheet-proof-standalone:hover { border-color: #1948c9; }

.brief .sheet-proof-zoom button[aria-pressed="true"] { background: #eff3ff; }
.brief .sheet-proof button:disabled { opacity: .53; cursor: default; }
.sheet-proof [hidden] { display: none !important; }

.sheet-proof-zoom output {
  min-width: 4ch;
  margin-inline-start: 5px;
  color: #515151;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.sheet-proof-viewport {
  display: flex;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding: clamp(12px, 2.25vw, 32px);
  background: #e9e9e6;
}

.sheet-proof-viewport:focus-visible { outline: 2px solid #1948c9; outline-offset: -3px; }

.sheet-proof-viewport img {
  flex: none;
  max-width: none;
  margin: auto;
  background: #fff;
  box-shadow: 0 0 0 1px #bfbbb4, 0 4px 12px rgb(26 29 40 / 12%);
  user-select: none;
  cursor: zoom-in;
}

.sheet-proof:has([data-proof-zoom="actual"][aria-pressed="true"]) img { cursor: zoom-out; }
.sheet-proof-viewport p { margin: auto; color: #515151; font-size: 14px; }

.studio-sheet-print-frame {
  position: fixed;
  inset: auto auto 0 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 650px) {
  .sheet-proof { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .sheet-proof-head, .sheet-proof-toolbar { gap: 8px; }
}
