.productivity-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0;
  padding: 0.8rem;
  border: 1px solid #d5e1dc;
  border-radius: 0.9rem;
  background: #f8fbf9;
}

.productivity-tabs button,
.urp-demo-role-toggle,
.urp-demo-role-choices button {
  min-height: 2.65rem;
  border: 1px solid #bbd0c8;
  border-radius: 999px;
  background: #fff;
  color: #21443e;
  padding: 0.55rem 0.95rem;
  font: inherit;
  cursor: pointer;
}

.productivity-tabs button[aria-pressed="true"],
.urp-demo-role-toggle {
  border-color: #0f5d5a;
  background: #0f5d5a;
  color: #fff;
}

.productivity-view-hidden {
  display: none !important;
}

.workbench-view-hidden {
  display: none !important;
}

.authorized-document-picker {
  display: grid;
  gap: 0.35rem;
  margin: 0.5rem 0 1rem;
  padding: 0.65rem;
  border: 1px solid #c8d8d2;
  border-radius: 0.7rem;
  background: #f7faf8;
  color: #244641;
}

.authorized-document-picker select {
  min-width: 0;
  max-width: 100%;
}

.authorized-document-picker small {
  overflow-wrap: anywhere;
  color: #4a635e;
}

.urp-demo-role-switcher {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem;
  border: 1px solid #d5e1dc;
  border-radius: 0.85rem;
  background: #f8fbf9;
}

.urp-demo-role-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.urp-demo-role-choices[hidden] {
  display: none;
}

.urp-demo-role-status {
  margin: 0.45rem 0 0;
  color: #52645f;
}

.token-debug {
  margin: 0.65rem 0;
  padding: 0.6rem 0.75rem;
  border: 1px dashed #bac8c3;
  border-radius: 0.6rem;
}

.token-debug > summary {
  color: #52645f;
  cursor: pointer;
}

.source-preview-list,
.cpc-export-actions,
.export-actions,
.d04-view-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.source-preview-card {
  min-width: 0;
  max-width: 100%;
  margin: 0.7rem 0;
  padding: 0.9rem;
  border: 1px solid #d5e1dc;
  border-radius: 0.8rem;
  background: #fbfdfc;
  overflow-wrap: anywhere;
}

.source-preview-text {
  display: block;
  max-height: 22rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.archive-index-list {
  min-width: 0;
  margin: 0.65rem 0;
  border: 1px solid #d5e1dc;
  border-radius: 0.6rem;
}

.archive-index-list > summary {
  padding: 0.65rem;
  cursor: pointer;
  font-weight: 650;
}

.archive-index-list ul {
  max-height: 18rem;
  margin: 0;
  padding: 0.5rem 1.8rem 0.8rem 2.2rem;
  overflow: auto;
  overflow-wrap: anywhere;
}

.archive-file-search {
  width: min(100% - 1rem, 32rem);
  margin: 0.25rem 0.5rem;
}

.archive-candidate {
  min-width: 0;
  margin: 0.75rem 0;
  padding: 0.75rem;
  border-left: 3px solid #547d70;
  background: #f4f8f6;
  overflow-wrap: anywhere;
}

.archive-candidate h5 {
  margin: 0.2rem 0 0.6rem;
}

.d04-view-controls label {
  flex: 1 1 18rem;
}

@media (max-width: 540px) {
  .productivity-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .productivity-tabs button {
    min-width: 0;
    padding: 0.55rem 0.6rem;
    white-space: normal;
  }

  .urp-demo-role-choices button {
    flex: 1 1 45%;
  }

  .source-preview-list,
  .cpc-export-actions,
  .export-actions,
  .d04-view-controls {
    align-items: stretch;
  }

  .source-preview-list button,
  .cpc-export-actions button,
  .export-actions button {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}
